describeDatabaseEntities method

Future<DescribeDatabaseEntitiesResponse> describeDatabaseEntities(
  1. String conversionWorkspace, {
  2. String? commitId,
  3. String? filter,
  4. int? pageSize,
  5. String? pageToken,
  6. String? tree,
  7. bool? uncommitted,
  8. String? view,
  9. String? $fields,
})

Describes the database entities tree for a specific conversion workspace and a specific tree type.

Database entities are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are simple data objects describing the structure of the client database.

Request parameters:

conversionWorkspace - Required. Name of the conversion workspace resource whose database entities are described. Must be in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/conversionWorkspaces/\[^/\]+$.

commitId - Optional. Request a specific commit ID. If not specified, the entities from the latest commit are returned.

filter - Optional. Filter the returned entities based on AIP-160 standard.

pageSize - Optional. The maximum number of entities to return. The service may return fewer entities than the value specifies.

pageToken - Optional. The nextPageToken value received in the previous call to conversionWorkspace.describeDatabaseEntities, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to conversionWorkspace.describeDatabaseEntities must match the call that provided the page token.

tree - Required. The tree to fetch. Possible string values are:

  • "DB_TREE_TYPE_UNSPECIFIED" : Unspecified tree type.
  • "SOURCE_TREE" : The source database tree.
  • "DRAFT_TREE" : The draft database tree.
  • "DESTINATION_TREE" : The destination database tree.

uncommitted - Optional. Whether to retrieve the latest committed version of the entities or the latest version. This field is ignored if a specific commit_id is specified.

view - Optional. Results view based on AIP-157 Possible string values are:

  • "DATABASE_ENTITY_VIEW_UNSPECIFIED" : Unspecified view. Defaults to basic view.
  • "DATABASE_ENTITY_VIEW_BASIC" : Default view. Does not return DDLs or Issues.
  • "DATABASE_ENTITY_VIEW_FULL" : Return full entity details including mappings, ddl and issues.
  • "DATABASE_ENTITY_VIEW_ROOT_SUMMARY" : Top-most (Database, Schema) nodes which are returned contains summary details for their decendents such as the number of entities per type and issues rollups. When this view is used, only a single page of result is returned and the page_size property of the request is ignored. The returned page will only include the top-most node types.

$fields - Selector specifying which fields to include in a partial response.

Completes with a DescribeDatabaseEntitiesResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<DescribeDatabaseEntitiesResponse> describeDatabaseEntities(
  core.String conversionWorkspace, {
  core.String? commitId,
  core.String? filter,
  core.int? pageSize,
  core.String? pageToken,
  core.String? tree,
  core.bool? uncommitted,
  core.String? view,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (commitId != null) 'commitId': [commitId],
    if (filter != null) 'filter': [filter],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (tree != null) 'tree': [tree],
    if (uncommitted != null) 'uncommitted': ['${uncommitted}'],
    if (view != null) 'view': [view],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' +
      core.Uri.encodeFull('$conversionWorkspace') +
      ':describeDatabaseEntities';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return DescribeDatabaseEntitiesResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}