Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

MappingRule

import type { MappingRule } from "https://googleapis.deno.dev/v1/datamigration:v1.ts";

Definition of a transformation that is to be applied to a group of entities in the source schema. Several such transformations can be applied to an entity sequentially to define the corresponding entity in the target schema.

interface MappingRule {
conditionalColumnSetValue?: ConditionalColumnSetValue;
convertRowidColumn?: ConvertRowIdToColumn;
displayName?: string;
entityMove?: EntityMove;
filterTableColumns?: FilterTableColumns;
multiColumnDataTypeChange?: MultiColumnDatatypeChange;
multiEntityRename?: MultiEntityRename;
name?: string;
readonly revisionCreateTime?: Date;
readonly revisionId?: string;
ruleOrder?: bigint;
ruleScope?:
| "DATABASE_ENTITY_TYPE_UNSPECIFIED"
| "DATABASE_ENTITY_TYPE_SCHEMA"
| "DATABASE_ENTITY_TYPE_TABLE"
| "DATABASE_ENTITY_TYPE_COLUMN"
| "DATABASE_ENTITY_TYPE_CONSTRAINT"
| "DATABASE_ENTITY_TYPE_INDEX"
| "DATABASE_ENTITY_TYPE_TRIGGER"
| "DATABASE_ENTITY_TYPE_VIEW"
| "DATABASE_ENTITY_TYPE_SEQUENCE"
| "DATABASE_ENTITY_TYPE_STORED_PROCEDURE"
| "DATABASE_ENTITY_TYPE_FUNCTION"
| "DATABASE_ENTITY_TYPE_SYNONYM"
| "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE"
| "DATABASE_ENTITY_TYPE_UDT"
| "DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW"
| "DATABASE_ENTITY_TYPE_DATABASE";
setTablePrimaryKey?: SetTablePrimaryKey;
singleColumnChange?: SingleColumnChange;
singleEntityRename?: SingleEntityRename;
singlePackageChange?: SinglePackageChange;
sourceSqlChange?: SourceSqlChange;
state?:
| "STATE_UNSPECIFIED"
| "ENABLED"
| "DISABLED"
| "DELETED";
}

§Properties

§
conditionalColumnSetValue?: ConditionalColumnSetValue
[src]

Optional. Rule to specify how the data contained in a column should be transformed (such as trimmed, rounded, etc) provided that the data meets certain criteria.

§
convertRowidColumn?: ConvertRowIdToColumn
[src]

Optional. Rule to specify how multiple tables should be converted with an additional rowid column.

§
displayName?: string
[src]

Optional. A human readable name

§
entityMove?: EntityMove
[src]

Optional. Rule to specify how multiple entities should be relocated into a different schema.

§

Required. The rule filter

§
filterTableColumns?: FilterTableColumns
[src]

Optional. Rule to specify the list of columns to include or exclude from a table.

§
multiColumnDataTypeChange?: MultiColumnDatatypeChange
[src]

Optional. Rule to specify how multiple columns should be converted to a different data type.

§
multiEntityRename?: MultiEntityRename
[src]

Optional. Rule to specify how multiple entities should be renamed.

§
name?: string
[src]

Full name of the mapping rule resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{set}/mappingRule/{rule}.

§
readonly revisionCreateTime?: Date
[src]

Output only. The timestamp that the revision was created.

§
readonly revisionId?: string
[src]

Output only. The revision ID of the mapping rule. A new revision is committed whenever the mapping rule is changed in any way. The format is an 8-character hexadecimal string.

§
ruleOrder?: bigint
[src]

Required. The order in which the rule is applied. Lower order rules are applied before higher value rules so they may end up being overridden.

§
ruleScope?: "DATABASE_ENTITY_TYPE_UNSPECIFIED" | "DATABASE_ENTITY_TYPE_SCHEMA" | "DATABASE_ENTITY_TYPE_TABLE" | "DATABASE_ENTITY_TYPE_COLUMN" | "DATABASE_ENTITY_TYPE_CONSTRAINT" | "DATABASE_ENTITY_TYPE_INDEX" | "DATABASE_ENTITY_TYPE_TRIGGER" | "DATABASE_ENTITY_TYPE_VIEW" | "DATABASE_ENTITY_TYPE_SEQUENCE" | "DATABASE_ENTITY_TYPE_STORED_PROCEDURE" | "DATABASE_ENTITY_TYPE_FUNCTION" | "DATABASE_ENTITY_TYPE_SYNONYM" | "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE" | "DATABASE_ENTITY_TYPE_UDT" | "DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW" | "DATABASE_ENTITY_TYPE_DATABASE"
[src]

Required. The rule scope

§
setTablePrimaryKey?: SetTablePrimaryKey
[src]

Optional. Rule to specify the primary key for a table

§
singleColumnChange?: SingleColumnChange
[src]

Optional. Rule to specify how a single column is converted.

§
singleEntityRename?: SingleEntityRename
[src]

Optional. Rule to specify how a single entity should be renamed.

§
singlePackageChange?: SinglePackageChange
[src]

Optional. Rule to specify how a single package is converted.

§
sourceSqlChange?: SourceSqlChange
[src]

Optional. Rule to change the sql code for an entity, for example, function, procedure.

§
state?: "STATE_UNSPECIFIED" | "ENABLED" | "DISABLED" | "DELETED"
[src]

Optional. The mapping rule state