Skip to main content

%TSQL.sys.constraints

persistent class %TSQL.sys.constraints extends %Library.Persistent

SQL Table Name: %TSQL_sys.constraints

Contains one row for every column in every table and view, and a row for each parameter in a stored procedure.

Property Inventory

Parameters

parameter READONLY = 1;
Inherited description: READONLY = 1 means that objects can be created, opened but not saved or deleted. Tables are projected to SQL as READONLY.

Properties

property colid as %TinyInt;
Column number in the table
Property methods: colidDisplayToLogical(), colidGet(), colidIsValid(), colidLogicalToDisplay(), colidNormalize(), colidSet()
property constrid as %Integer [ Required ];
Object ID of the constraint
Property methods: constridDisplayToLogical(), constridGet(), constridIsValid(), constridLogicalToDisplay(), constridNormalize(), constridSet()
property parentobjname as %String (MAXLEN = 128) [ SqlFieldName = parent_obj_name ];
Parent Object name Object name of the parent_obj.
Property methods: parentobjnameDisplayToLogical(), parentobjnameGet(), parentobjnameIsValid(), parentobjnameLogicalToDisplay(), parentobjnameLogicalToOdbc(), parentobjnameNormalize(), parentobjnameSet()
property schema as %String (MAXLEN = 128);
Name of the schema the column resides in
Property methods: schemaDisplayToLogical(), schemaGet(), schemaIsValid(), schemaLogicalToDisplay(), schemaLogicalToOdbc(), schemaNormalize(), schemaSet()
property status as %Integer;
The type of constraint: 0x0040 = a referential constraint 0x0080 = a check constraint
Property methods: statusDisplayToLogical(), statusGet(), statusIsValid(), statusLogicalToDisplay(), statusNormalize(), statusSet()
property tableid as %Integer [ Required ];
ID of the table on which the constraint is declared
Property methods: tableidDisplayToLogical(), tableidGet(), tableidIsValid(), tableidLogicalToDisplay(), tableidNormalize(), tableidSet()

Indexes

index (IDKEYIndex on tableid,constrid) [IdKey, Type = key, Unique];
Index methods: IDKEYIndexCheck(), IDKEYIndexDelete(), IDKEYIndexExists(), IDKEYIndexOpen(), IDKEYIndexSQLCheckUnique(), IDKEYIndexSQLExists(), IDKEYIndexSQLFindPKeyByConstraint(), IDKEYIndexSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: CacheSQLStorage

Maps: 2

  • Map number 1 is named Master

    thismap.Global: ^oddTSQL

  • Map number 2 is named SchemaNameIndex

    thismap.Global: ^oddSQL

  • ^oddTSQL({tableid},"con",{constrid})
    =
    Node Delimiter Piece Name
    1 schema
    2 parent_obj_name
    3 colid
    4 status
    ^oddSQL({schema},{parent_obj_name},"tsql",1,{tableid},"con",{constrid})
    =
FeedbackOpens in a new tab