Skip to main content

User Datatypes

Map SQL datatypes to their InterSystems IRIS® data platform equivalents.

Synopsis

[SqlUserDatatypes]    x=a

x is the name of an SQL datatype. a is the InterSystems IRIS equivalent.

Description

The [SqlUserDatatypes] section contains a user-defined datatype descriptions. Each description maps an SQL datatype to its InterSystems IRIS equivalent in the format x=a, as follows:

  • Each keyword x is the name of the SQL datatype, plus any allowed arguments.

  • The value a is the InterSystems IRIS equivalent, including any constraints on the arguments.

Example

With the following line in the CPF, when MYVARCHAR(10) is seen in a statement, the property is created with type %Library.String(MAXLEN=10,TRUNCATE=0).

[SqlUserDatatypes]
MYVARCHAR(%1)=%Library.String(MAXLEN=%1,TRUNCATE=0)
Copy code to clipboard

Changing This Parameter

On the User-defined DDL Mappings page of the Management Portal (System Administration > Configuration > SQL and Object Settings > User DDL Mappings), click Create New User-defined DDL Mapping to add a new datatype mapping, or click Edit to modify an existing one.

Instead of using the Management Portal, you can modify datatype definitions in the Config.SqlUserDatatypes class (as described in the class reference) or by editing the CPF in a text editor (as described in the Editing the Active CPF section of the “Introduction to the Configuration Parameter File” chapter in this book).

See Also