Skip to main content


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

SQL Table Name: %TSQL_sys.keys

contains one row for each primary, foreign, or common key.

Property Inventory


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.


property constrid as %Integer [ SqlFieldName = constr_id , Required ];
Object ID of the constraint this key belongs to
Property methods: constridDisplayToLogical(), constridGet(), constridIsValid(), constridLogicalToDisplay(), constridNormalize(), constridSet()
property id as %Integer [ Required ];
Object ID of the table this key belongs to
Property methods: idDisplayToLogical(), idGet(), idIsValid(), idLogicalToDisplay(), idNormalize(), idSet()
property key1 as %Integer;
Column ID
Property methods: key1DisplayToLogical(), key1Get(), key1IsValid(), key1LogicalToDisplay(), key1Normalize(), key1Set()
property key2 as %Integer;
Column ID
Property methods: key2DisplayToLogical(), key2Get(), key2IsValid(), key2LogicalToDisplay(), key2Normalize(), key2Set()
property key3 as %Integer;
Column ID
Property methods: key3DisplayToLogical(), key3Get(), key3IsValid(), key3LogicalToDisplay(), key3Normalize(), key3Set()
property key4 as %Integer;
Column ID
Property methods: key4DisplayToLogical(), key4Get(), key4IsValid(), key4LogicalToDisplay(), key4Normalize(), key4Set()
property key5 as %Integer;
Column ID
Property methods: key5DisplayToLogical(), key5Get(), key5IsValid(), key5LogicalToDisplay(), key5Normalize(), key5Set()
property key6 as %Integer;
Column ID
Property methods: key6DisplayToLogical(), key6Get(), key6IsValid(), key6LogicalToDisplay(), key6Normalize(), key6Set()
property key7 as %Integer;
Column ID
Property methods: key7DisplayToLogical(), key7Get(), key7IsValid(), key7LogicalToDisplay(), key7Normalize(), key7Set()
property key8 as %Integer;
Column ID
Property methods: key8DisplayToLogical(), key8Get(), key8IsValid(), key8LogicalToDisplay(), key8Normalize(), key8Set()
property keycnt as %Integer;
Number of non-NULL keys
Property methods: keycntDisplayToLogical(), keycntGet(), keycntIsValid(), keycntLogicalToDisplay(), keycntNormalize(), keycntSet()
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 type as %SmallInt;
Record type
Property methods: typeDisplayToLogical(), typeGet(), typeIsValid(), typeLogicalToDisplay(), typeNormalize(), typeSet()


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

Inherited Members

Inherited Methods


Storage Model: CacheSQLStorage

Maps: 2

  • Map number 1 is named Master

    thismap.Global: ^oddTSQL

  • Map number 2 is named SchemaNameIndex

    thismap.Global: ^oddSQL

  • ^oddTSQL({id},"key",{constr_id})
    Node Delimiter Piece Name
    1 schema
    2 parent_obj_name
    3 type
    4 keycnt
    5 key1
    6 key2
    7 key3
    8 key4
    9 key5
    10 key6
    11 key7
    12 key8
FeedbackOpens in a new tab