Class annotations

 

Tagged values

The tagged values available at class level are presented in the following table.

 

The ... tagged value

is used to ...

Oracle

{key}

define "unique" constraints.

UNIQUE

{check}

define a "check" constraint.

CHECK

{cluster}

link the table to a predefined cluster.

CLUSTER

{initrans}

change the characteristics of the table.

INITTRANS

{maxtrans}

as above.

MAXTRANS

{pctfree}

as above.

PCTFREE

{pctused}

as above.

PCTUSED

{storage}

as above.

STORAGE

{noDDL}

delete the generation of the definition language.

 

{tablespace}

specify the logical storage unit of the data.

TABLESPACE

{indexSpace}

specify the tablespace for the index.

TABLESPACE

{indexStorage} 

specify the STORAGE class for creating the index.

STORAGE

 

 

The {check} tagged value

This tagged value's unique parameter is the logical condition, used as is, for building the clause's SQL.  We recommend that you place this parameter between inverted commas for the syntactical analyzer.

 

Example:

{check}("(att1 + att2)between 1 and 12")

 

 

The {cluster} tagged value

This tagged value is used to link the table to a pre-existing cluster (for example created within a "sqlbefore" item).

 

The descriptor of the tagged value gives the cluster's name, whereas the parameters correspond to the list of columns associated to the cluster.

 

 

The {key} tagged value

This {key} tagged value allows the definition of uniqueness constraints associated with the generated table.  The descriptor gives the name, whilst the parameters provide the necessary columns.

 

Example:

ALTER TABLE <table name> ADD CONSTRAINT (<constraint name> UNIQUE (<attribute name>))

 

 

The {initrans}, {maxtrans}, {pctfree}, {pctused} and {storage} tagged values

These tagged values have as unique parameter the value of the Oracle parameter, with the same name as will be generated in this case.  They must not be used together with a cluster (please see Oracle SQL 4-210).

 

 

The {tablespace} tagged value

This tagged value is used to specify the logical storage unit of the data.  Classes not annotated with {tablespace} are stored in the SYSTEM tablespace.

 

 

The {indexSpace} tagged value

This tagged value allows the specification of the "tablespace" where the class index will be created.

 

 

The {indexStorage} tagged value

This tagged value is used to specify the "STORAGE" Oracle clause for indexes.

 

The parameter of this tagged value must contain, between inverted commas, the different Oracle parameters associated to a parameter's value.

 

Example:

"INITIAL 1024 NEXT 2048"