|
Options |
Name |
Purpose |
|
|
|
Clear ()
|
Empties the store, discarding the whole schema (aliases included)
Notes :
*/
|
|
|
|
CreateAlias (character, character)
|
Registers (or updates) a schema alias for a database name
Notes : Mirrors the Java Proparse Schema alias map and the parser's
CREATE ALIAS / &-alias handling. An alias name that equals a
logical database name is redundant but harmless.
@param pcAlias The alias name
@param pcDatabaseName The logical database name the alias resolves to
*/
|
|
|
|
LOGICAL DatabaseExists (integer)
|
Returns whether a database id refers to a live database
Notes :
@param piDatabaseId The database id
@return Logical value
*/
|
|
|
|
INTEGER DatabaseIds ()
|
Returns the ids of every database in the store, in load order
Notes : Indeterminate when the store is empty.
@return The array of database ids (indeterminate when none)
*/
|
|
|
|
CHARACTER DatabaseName (integer)
|
Returns the logical name of a database
Notes :
@param piDatabaseId The database id
@return The logical database name, or the empty string
*/
|
|
|
|
CHARACTER DatabasePhysicalName (integer)
|
Returns the physical name of a database
Notes :
@param piDatabaseId The database id
@return The physical database name, or the empty string
*/
|
|
|
|
DeleteAlias (character)
|
Removes a schema alias
Notes :
@param pcAlias The alias name
*/
|
|
|
|
CHARACTER FieldDataType (integer)
|
Returns the ABL data type of a field
Notes :
@param piFieldId The field id
@return The data type, or the empty string
*/
|
|
|
|
LOGICAL FieldExists (integer, character)
|
Returns whether a field exists within a table
Notes :
@param piTableId The table id
@param pcFieldName The field name
@return Logical value
*/
|
|
|
|
INTEGER FieldExtent (integer)
|
Returns the extent of a field (0 for a scalar field)
Notes :
@param piFieldId The field id
@return The extent
*/
|
|
|
|
INTEGER FieldIds (integer)
|
Returns the ids of the fields of a table, in field order
Notes : Indeterminate when the table holds no fields.
@param piTableId The table id
@return The array of field ids (indeterminate when none)
*/
|
|
|
|
CHARACTER FieldName (integer)
|
Returns the name of a field
Notes :
@param piFieldId The field id
@return The field name, or the empty string
*/
|
|
|
|
INTEGER FieldTableId (integer)
|
Returns the table id owning a field
Notes :
@param piFieldId The field id
@return The table id, or 0
*/
|
|
|
|
CHARACTER IndexFieldNames (integer)
|
Returns the comma-separated field names of an index, in sequence
Notes :
@param piIndexId The index id
@return The comma-separated field names (empty when none)
*/
|
|
|
|
INTEGER IndexIds (integer)
|
Returns the ids of the indexes of a table, in load order
Notes : Indeterminate when the table holds no indexes.
@param piTableId The table id
@return The array of index ids (indeterminate when none)
*/
|
|
|
|
LOGICAL IndexIsPrimary (integer)
|
Returns whether an index is the table's primary index
Notes :
@param piIndexId The index id
@return Logical value
*/
|
|
|
|
LOGICAL IndexIsUnique (integer)
|
Returns whether an index is unique
Notes :
@param piIndexId The index id
@return Logical value
*/
|
|
|
|
CHARACTER IndexName (integer)
|
Returns the name of an index
Notes :
@param piIndexId The index id
@return The index name, or the empty string
*/
|
|
|
|
INTEGER IndexTableId (integer)
|
Returns the table id owning an index
Notes :
@param piIndexId The index id
@return The table id, or 0
*/
|
|
|
|
LOGICAL IsAlias (character)
|
Returns whether a name is a registered schema alias
Notes :
@param pcAlias The name to test
@return Logical value
*/
|
|
|
|
INTEGER LoadConnectedDatabases ()
|
Loads the schema of all currently connected databases
Notes : Iterates the connected databases (NUM-DBS / LDBNAME / PDBNAME) and
reads each one's meta-schema. A database whose meta-schema cannot be
read (e.g. a non-Progress connection) is skipped so partial / no
connections stay graceful. Clears the store first, so it doubles as
the refresh implementation.
@return The number of databases loaded
*/
|
|
|
|
LoadDatabase (character, character, integer)
|
Loads the meta-schema of a single connected database
Notes : Reads the _File / _Field / _Index / _Index-field VSTs of the given
logical database through dynamic buffers, in four scans linked by
int64 RECID maps. Any error while reading a database's meta-schema
is swallowed (the partially-built records for that database remain
but do no harm); a database that cannot be opened at all contributes
nothing.
@param pcLogicalName The logical database name (LDBNAME)
@param pcPhysicalName The physical database name (PDBNAME)
@param piSeq The connection sequence (NUM-DBS order)
*/
|
|
|
|
LoadFields (handle, character)
|
Loads the fields of a database (_Field VST)
Notes : Each field is mapped to its table through the _File-recid map. A
field whose table was not captured (e.g. a VST field) is skipped.
@param phField The _Field buffer handle
@param pcLogicalName The logical database name (query qualifier)
*/
|
|
|
|
LoadFiles (handle, character, integer)
|
Loads the user tables of a database (_File VST)
Notes : Only user tables are captured (_File-Number > 0 and _Owner = "PUB"),
which excludes the meta-schema VSTs (negative file numbers) and the
SQL system catalog (non-PUB owners), as the disambiguation needs.
@param phFile The _File buffer handle
@param pcLogicalName The logical database name (query qualifier)
@param piDatabaseId The owning database id
*/
|
|
|
|
LoadIndexes (handle, character)
|
Loads the indexes of a database (_Index VST)
Notes : Each index is mapped to its table through the _File-recid map and
flagged unique / primary (the table's _Prime-Index RECID).
@param phIndex The _Index buffer handle
@param pcLogicalName The logical database name (query qualifier)
*/
|
|
|
|
LoadIndexFields (handle, character)
|
Loads the index-field membership of a database (_Index-field VST)
Notes : Each entry is mapped to its index through the _Index-recid map and
to its field name through the _Field-recid map. Placeholder default
index entries (_Field-recid <= 0) are skipped.
@param phIndexField The _Index-field buffer handle
@param pcLogicalName The logical database name (query qualifier)
*/
|
|
|
|
INTEGER LookupDatabaseId (character)
|
Returns the id of a database by logical (or alias) name, or 0
Notes : The name is alias-resolved first.
@param pcName The database or alias name
@return The database id, or 0 when there is no such database
*/
|
|
|
|
INTEGER LookupFieldId (integer, character)
|
Returns the id of a field within a table, or 0
Notes :
@param piTableId The table id
@param pcFieldName The field name
@return The field id, or 0 when there is no such field
*/
|
|
|
|
INTEGER LookupQualifiedTableId (character, character)
|
Returns the id of a table qualified by database (or alias), or 0
Notes : The database qualifier is alias-resolved first.
@param pcDatabaseName The database or alias name
@param pcTableName The table name
@return The table id, or 0 when there is no such table
*/
|
|
|
|
INTEGER LookupTableId (character)
|
Returns the id of a table by name, or 0
Notes : Searches every database for an unqualified name; the first
match (by connection / load order) wins, as in the Java
Proparse unqualified table lookup. A dotted name resolves
through its first two parts as database and table - like the
reference schema lookup, which splits a name at its dots and
ignores a third part, so a db.table.field name in a record
position is the table (SCL-5780).
@param pcTableName The table name, optionally database-qualified
@return The table id, or 0 when there is no such table
*/
|
|
|
|
INTEGER LookupUnqualifiedFieldId (character)
|
Returns the id of the first field of any table whose name begins
with the given (possibly abbreviated) name
Notes : Mirrors the reference schema's unqualified-field lookup
(Schema.lookupUnqualifiedField): the tables are visited in name
order (database name breaking ties, the ALLTABLES_ORDER
comparator) and the first table holding a prefix-matching field
wins. Uniqueness is not tested - that job is left to the
compiler (SCL-5619).
@param pcFieldName The field name (may be abbreviated)
@return The field id, or 0 when no table holds such a field
*/
|
|
|
|
CHARACTER ResolveDatabaseName (character)
|
Resolves a database-or-alias name to a logical database name
Notes : Returns the aliased database name when the input is a registered
alias, otherwise the input unchanged (so a real database name
passes through).
@param pcName The database or alias name
@return The resolved logical database name
*/
|
|
|
|
INTEGER TableDatabaseId (integer)
|
Returns the database id of a table
Notes :
@param piTableId The table id
@return The database id, or 0
*/
|
|
|
|
CHARACTER TableDatabaseName (integer)
|
Returns the logical database name of a table
Notes :
@param piTableId The table id
@return The database name, or the empty string
*/
|
|
|
|
LOGICAL TableExists (character)
|
Returns whether an unqualified table name exists in any database
Notes :
@param pcTableName The table name
@return Logical value
*/
|
|
|
|
INTEGER TableIdByFileRecid (int64)
|
Returns the table id owning a _File RECID, or 0
Notes : Internal helper for the field loader's _File-recid map.
@param piFileRecid The _File RECID as int64
@return The table id, or 0 when not captured
*/
|
|
|
|
LOGICAL TableIdExists (integer)
|
Returns whether a table id refers to a live table
Notes :
@param piTableId The table id
@return Logical value
*/
|
|
|
|
INTEGER TableIds (integer)
|
Returns the ids of the tables of a database, in load order
Notes : Indeterminate when the database holds no tables.
@param piDatabaseId The database id
@return The array of table ids (indeterminate when none)
*/
|
|
|
|
CHARACTER TableName (integer)
|
Returns the name of a table
Notes :
@param piTableId The table id
@return The table name, or the empty string
*/
|
|
|
|
INTEGER TableStoreType (integer)
|
Returns the StoreType value of a table (a StoreTypeEnum value)
Notes : Always DBTABLE for schema tables loaded from the dictionary.
@param piTableId The table id
@return The StoreType value, or 0
*/
|