mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-10-28 03:24:29 +08:00
* dbeaver/pro#5145 add rename action for connection * dbeaver/pro#5145 return node id in renaming node function * dbeaver/pro#5145 add can rename feature for data source * dbeaver/pro#5145 use new node path from backend * dbeaver/pro#5145 use new node id --------- Co-authored-by: Ainur <ainur.iagudin@dbeaver.com> Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
173 lines
4.9 KiB
GraphQL
173 lines
4.9 KiB
GraphQL
# Nodes, objects and properties
|
|
|
|
type ObjectDescriptor {
|
|
id: Int
|
|
displayName: String
|
|
fullName: String
|
|
uniqueName: String
|
|
description: String
|
|
value: String
|
|
}
|
|
|
|
input ObjectPropertyFilter {
|
|
ids: [String!]
|
|
features: [String!]
|
|
categories: [String!]
|
|
dataTypes: [String!]
|
|
}
|
|
|
|
type ObjectDetails {
|
|
id: Int
|
|
displayName: String
|
|
description: String
|
|
value: Object
|
|
}
|
|
|
|
type DatabaseObjectInfo {
|
|
" Object name"
|
|
name: String
|
|
" Description - optional"
|
|
description: String
|
|
" Object type. Java class name in most cases"
|
|
type: String
|
|
|
|
"""
|
|
Read object properties.
|
|
Optional parameter 'ids' filters properties by id. null means all properties.
|
|
Note: property value reading may take a lot of time so don't read all property values always
|
|
Examine property meta (features in particular) before reading them
|
|
"""
|
|
properties(filter: ObjectPropertyFilter): [ ObjectPropertyInfo ]
|
|
|
|
# Optional properties
|
|
|
|
ordinalPosition: Int
|
|
fullyQualifiedName: String
|
|
overloadedName: String
|
|
uniqueName: String
|
|
state: String
|
|
|
|
"Features: script, scriptExtended, dataContainer, dataManipulator, entity, schema, catalog"
|
|
features: [ String! ]
|
|
|
|
" Supported editors: ddl, permissions, sourceDeclaration, sourceDefinition"
|
|
editors: [ String! ]
|
|
}
|
|
|
|
type NavigatorNodeInfo {
|
|
"Node ID - generally a full path to the node from root of tree"
|
|
id: ID!
|
|
"Node URI - a unique path to a node including all parent nodes"
|
|
uri: ID! @since(version: "23.3.1")
|
|
"Node human readable name"
|
|
name: String
|
|
"Node full name"
|
|
fullName: String @deprecated(reason: "use name parameter (23.2.0)")
|
|
"Node plain name (23.2.0)"
|
|
plainName: String
|
|
"Node icon path"
|
|
icon: String
|
|
"Node description"
|
|
description: String
|
|
"Node type"
|
|
nodeType: String
|
|
"Can this property have child nodes?"
|
|
hasChildren: Boolean!
|
|
"Project id of the node"
|
|
projectId: String
|
|
|
|
"Associated object. Maybe null for non-database objects"
|
|
object: DatabaseObjectInfo
|
|
|
|
"""
|
|
Associated object. Return value depends on the node type - connectionId for connection node, resource path for resource node, etc.
|
|
null - if node currently not support this property
|
|
"""
|
|
objectId: String @since(version: "23.2.4")
|
|
|
|
"Supported features: item, container, leaf, canDelete, canRename"
|
|
features: [ String! ]
|
|
|
|
"""
|
|
Object detailed info.
|
|
If is different than properties. It doesn't perform any expensive operation and doesn't require authentication.
|
|
"""
|
|
nodeDetails: [ ObjectPropertyInfo! ]
|
|
|
|
folder: Boolean!
|
|
inline: Boolean!
|
|
navigable: Boolean!
|
|
filtered: Boolean!
|
|
|
|
"Reads node filter. Expensive invocation, read only when it is really needed"
|
|
filter: NavigatorNodeFilter
|
|
}
|
|
|
|
type NavigatorNodeFilter {
|
|
include: [String!]
|
|
exclude: [String!]
|
|
}
|
|
|
|
type DatabaseCatalog {
|
|
catalog: NavigatorNodeInfo!
|
|
schemaList: [ NavigatorNodeInfo! ]!
|
|
}
|
|
|
|
type DatabaseStructContainers {
|
|
parentNode: NavigatorNodeInfo
|
|
catalogList: [ DatabaseCatalog! ]!
|
|
schemaList: [ NavigatorNodeInfo! ]!
|
|
supportsCatalogChange: Boolean!
|
|
supportsSchemaChange: Boolean!
|
|
defaultCatalog: String @since(version: "25.2.2")
|
|
defaultSchema: String @since(version: "25.2.2")
|
|
}
|
|
|
|
####################################################
|
|
# Main API
|
|
####################################################
|
|
|
|
extend type Query {
|
|
|
|
"Returns child nodes based on parent node path"
|
|
navNodeChildren(
|
|
parentPath: ID!,
|
|
offset: Int,
|
|
limit: Int,
|
|
onlyFolders: Boolean): [ NavigatorNodeInfo! ]!
|
|
|
|
"Returns parent nodes for the specified node path"
|
|
navNodeParents( nodePath: ID! ): [ NavigatorNodeInfo! ]!
|
|
|
|
"Returns node info for the specified node path"
|
|
navNodeInfo( nodePath: ID! ): NavigatorNodeInfo!
|
|
|
|
"Refreshes node based on the node path"
|
|
navRefreshNode( nodePath: ID! ): Boolean @deprecated # Use navReloadNode method from Mutation (24.2.4)
|
|
|
|
# contextId currently not using
|
|
navGetStructContainers( projectId: ID, connectionId: ID!, contextId: ID, catalog: ID ): DatabaseStructContainers!
|
|
|
|
}
|
|
|
|
extend type Mutation {
|
|
|
|
"Reloads node and returns updated node info"
|
|
navReloadNode( nodePath: ID! ): NavigatorNodeInfo!
|
|
|
|
"Renames node and returns new node id"
|
|
navRenameNode( nodePath: ID!, newName: String! ): String!
|
|
|
|
"Deletes nodes with specified IDs and returns number of deleted nodes"
|
|
navDeleteNodes( nodePaths: [ID!]! ): Int
|
|
|
|
"Moves nodes with specified IDs to the connection folder"
|
|
navMoveNodesToFolder( nodePaths: [ID!]!, folderPath: ID!): Boolean!
|
|
|
|
"""
|
|
Sets filter for the folder node. If both include and exclude are null then filter is removed.
|
|
Node must be refreshed after applying filters. Node children can be changed
|
|
"""
|
|
navSetFolderFilter( nodePath: ID!, include: [String!], exclude: [String!]): Boolean!
|
|
|
|
} |