Syntax Element: types
Description
Declares the base types used by a database class.
Example
This keyword is highlighted
like this.
You can click on keywords and concepts in blue.
database SomeDatabase { types // logical name 'int', database name 'int', integer client type int as integer, // logical name 'number', database name 'numeric', real number client type number ("numeric") as real, // logical name 'nstring', database type 'nvarchar', string client type nstring ("nvarchar") as string; version 1.0 : initialized { design { public table T { public column C1 with DataType = type(int); public column C2 with DataType = type(int null); public column C3 with DataType = type(nstring(20)); public column C4 with DataType = type(nstring(100) null); public column C5 with DataType = type(number(10, 3)); public column C6 with DataType = type(number(12, 4) null); } } } }
Notes
- Each base type is three-way mapping between logical name, database name, and client type. Base types do not always have enough information to identify a real type. That is why, when they are used to specify the type of a column or parameter, you must use the type operator.
Related Use Cases
- Specifying design separately from construction
- Getting compiler feedback on your database design
- Eliminating duplication between client and database code
- Keeping clients coupled to the current version
- Leveraging a version's proxy in a client
- Transition testing
Related Concepts
Other Actions
documentation | all examples for this syntax element | all examples | use cases | concepts | keywords
database