Domain

The Domain category is located in the Root > Script > Objects category, and can contain the following items that define how domains are modeled for your DBMS.

Item

Description

[Common items]

The following common object items may be defined for domains:

  • AfterCreate, AfterDrop, AfterModify

  • BeforeCreate, BeforeDrop, BeforeModify

  • Create, Drop

  • Enable, EnableOwner

  • Maxlen

  • ModifiableAttributes

  • ReversedQueries, ReversedStatements

  • SqlAttrQuery, SqlListQuery

For a description of each of these common items, see Common object items.

Bind

Specifies the syntax for binding a business rule to a domain.

Example (ASE 15):

[%R%?[exec ]][execute ]sp_bindrule [%R%?['[%QUALIFIER%]%RULE%'][[%QUALIFIER%]%RULE%]:['[%QUALIFIER%]%RULE%']], %DOMAIN%

EnableBindRule

Specifies whether business rules may be bound to domains for check parameters. The following settings are available:

  • Yes - The Create and Bind entry of Rule are generated

  • No - The check inside the domain Add order is generated

EnableCheck

Specifies whether check parameters are generated.

This item is tested during column generation. If User-defined Type is selected for columns in the Generation dialog box, and EnableCheck is set to Yes for domains, then the check parameters are not generated for columns, since the column is associated with a domain with check parameters. When the checks on the column diverge from those of the domain, the column checks are generated.

The following settings are available:

  • Yes - Check parameters are generated

  • No - Variables linked to check parameters are not evaluated during generation and reverse

EnableDefault

Specifies whether default values are generated. The following settings are available:

  • Yes - Default values defined for domains are generated. The default value can be defined in the check parameters. The %DEFAULT% variable contains the default value

  • No - Default values are not generated

SqlListDefault Query

Specifies a SQL query to retrieve and list domain default values in the system tables during reverse engineering.

UddtComment

Specifies a statement for adding a user-defined data type comment.

Unbind

Specifies the syntax for unbinding a business rule from a domain.

Example (ASE 15):

[%R%?[exec ]][execute ]sp_unbindrule %DOMAIN%