At runtime, gets metadata information about domains from the model developed in USoft Definer. This information takes the form of domain attribute settings, such as information about data type, column length, and allowed values.
Returns an XML document of the form demonstrated in Example 1 below.
Syntax
SELECT USMeta.Domains(
domain-name-pattern Domains
, type-pattern Type
)
|
All parameters are optional. Parameter values that you pass are mapped to parameters by alias name. The '.*ID.*' value in the following example is for domain-name-pattern because of the "Domains" alias:
SELECT USMeta.Domains( '.*ID.*' Domains )
|
(For backward compatibility only, it is possible to supply parameter values by position. Using this syntax, a list of non-aliased values maps to the parameter list in the order stated, with empty values at the end of the list if you supply less than 2 values, and '' (the empty string) as a way of explicitly declaring an empty value.)
Domain-name-pattern is a regular expression that matches zero, one or more domain names in the model. The result data is limited to domains matching the pattern. If domain-name-pattern is omitted, then result data is not limited in this way.
Type-pattern is a regular expression that matches zero, one or more data types of domains in the model. The result data is limited to domains with a data type matching the pattern. If type-pattern is omitted, then result data is not limited in this way. The following are valid data types in USoft:
BINARY
|
IMAGE
|
NTEXT
|
TEXT
|
BIT
|
INT
|
NUMBER
|
TIME
|
BLOB
|
INTEGER
|
NUMERIC
|
TIMESTAMP
|
CHAR
|
LONG
|
NVARCHAR
|
TINYINT
|
CLOB
|
LONGRAW
|
NVARCHAR2
|
VARBINARY
|
DATE
|
LONG VARBINARY
|
RAW
|
VARCHAR
|
DATETIME
|
LONG VARCHAR
|
REAL
|
VARCHAR2
|
DECIMAL
|
MONEY
|
SMALLDATETIME
|
WCHAR
|
DOUBLE PRECISION
|
NCHAR
|
SMALLINT
|
WLONGVARCHAR
|
FLOAT
|
NCLOB
|
SMALLMONEY
|
WVARCHAR
|
Example 1
This example returns domain information about any domains in the model that have a name containing the letters 'ID', and a 'NUMBER' data type:
SELECT USMeta.Domains(
'.*ID.*' Domains
, 'NUMBER' Type
)
|
The return value of this statement could be:
<?xml version="1.0" encoding="UTF-16"?>
<Meta>
<Domains>
<Domain NAME="DISCOUNT_ID" DATABASE_TYPE="NUMBER" DISPLAY_data type="NUMBER" UPPERCASE="N" UNICODE_TYPE="N" TOTAL_LENGTH="2"
LENGTH_AFTER_PERIOD="0" DISPLAY_LENGTH="0" DISPLAY_LENGTH_AFTER_PERIOD="0" FIXED_LENGTH="N" DEFAULT_VALUE="" MIN_VALUE=""
MAX_VALUE="" HELP_TEXT="" DOMAIN_MODULE="TRAVEL2" SUPER_DOMAIN="" SEQNO_TYPE="RDMBS" SEQNO_COMPONENT="" REGEX="" INTERFACE="N" IO_FORMAT=""/>
<Domain NAME="PERSON_ID" DATABASE_TYPE="NUMBER" DISPLAY_data type="INT" UPPERCASE="N" UNICODE_TYPE="N" TOTAL_LENGTH="5"
LENGTH_AFTER_PERIOD="0" DISPLAY_LENGTH="0" DISPLAY_LENGTH_AFTER_PERIOD="0" FIXED_LENGTH="N" DEFAULT_VALUE="" MIN_VALUE=""
MAX_VALUE="" HELP_TEXT="" DOMAIN_MODULE="TRAVEL2" SUPER_DOMAIN="" SEQNO_TYPE="RDMBS" SEQNO_COMPONENT="" REGEX="" INTERFACE="N" IO_FORMAT=""/>
<Domain NAME="RES_ID" DATABASE_TYPE="NUMBER" DISPLAY_data type="INT" UPPERCASE="N" UNICODE_TYPE="N" TOTAL_LENGTH="5"
LENGTH_AFTER_PERIOD="0" DISPLAY_LENGTH="0" DISPLAY_LENGTH_AFTER_PERIOD="0" FIXED_LENGTH="N" DEFAULT_VALUE="" MIN_VALUE="" MAX_VALUE=""
HELP_TEXT="" DOMAIN_MODULE="TRAVEL2" SUPER_DOMAIN="" SEQNO_TYPE="RDMBS" SEQNO_COMPONENT="" REGEX="" INTERFACE="N" IO_FORMAT=""/>
<Domain NAME="TOUR_ID" DATABASE_TYPE="NUMBER" DISPLAY_data type="INT" UPPERCASE="N" UNICODE_TYPE="N" TOTAL_LENGTH="4"
LENGTH_AFTER_PERIOD="0" DISPLAY_LENGTH="0" DISPLAY_LENGTH_AFTER_PERIOD="0" FIXED_LENGTH="N" DEFAULT_VALUE="" MIN_VALUE="" MAX_VALUE=""
HELP_TEXT="" DOMAIN_MODULE="TRAVEL2" SUPER_DOMAIN="" SEQNO_TYPE="RDMBS" SEQNO_COMPONENT="" REGEX="" INTERFACE="N" IO_FORMAT=""/>
</Domains>
</Meta>
|
See also
USMeta internal component
|