...
Code Block | ||||
---|---|---|---|---|
| ||||
CREATE TABLE GT_PK_METADATA ( TABLE_SCHEMA varchar(255) NOT NULL, TABLE_NAME varchar(255) NOT NULL, PK_COLUMN varchar(255) NOT NULL, PK_COLUMN_IDX int NOT NULL, PK_POLICY varchar(255) NOT NULL, PK_SEQUENCE varchar(255), UNIQUE(TABLE_SCHEMA, TABLE_NAME, PK_COLUMN), CHECK(PK_POLICY IN ('ASSIGNED','SEQUENCE', 'AUTOGENERATED') ) ) |
Primary Key Metadata
If the primary key for a table can not be determined by Weave directly from the database then the information can be provided by creating a table or directly embedding the information in the spatial engine configuration.
Column | Description |
---|---|
table_schema | Name of the database schema in which the table is located. |
table_name | Name of the table to be published |
pk_column | Name of a column used to form the feature IDs |
pk_column_idx | Index of the column in a multi-column key. In case multi column keys are needed multiple records with the same table schema and table name will be used. |
pk_policy | The new value generation policy, used in case a new feature needs to be added in the table ('assigned', 'sequence' or 'autogenerated'). Where: |
pk_sequence | The name of the database sequence to be used when generating a new value for the pk_column. The pk_sequence value only need to be set if the pk_policy is 'sequence'. |
...