Describes Domain type information for a column in a table.
public interface Domain
All members of Domain interface, including all inherited members.
Name | Description |
---|---|
Domain ID constant for a 64-bit integer (SQL type BIGINT). | |
Domain ID constant for a variable-length binary object of maximum size bytes (SQL type BINARY(size)). | |
Domain ID constant for a bit (SQL type BIT). | |
Domain ID constant for a Date (SQL type DATE). | |
Maximum kinds of Domain types. | |
Domain ID constant for a 8-byte floating point (SQL type DOUBLE). | |
Domain ID constant for a 32-bit integer (SQL type INTEGER). | |
Domain ID constant for an arbitrary long block of binary data (BLOB) (SQL type LONG BINARY). | |
Domain ID constant for an arbitrary file of data. | |
Domain ID constant for an arbitrary long block of character data (CLOB) (SQL type LONG VARCHAR). | |
Domain ID constant for a numeric value of fixed precision (size) total digits and with scale digits after the decimal (SQL type NUMERIC(precision,scale)). | |
Domain ID constant for a 4-byte floating point (SQL type REAL). | |
Domain ID constant for a 16-bit integer (SQL type SMALLINT). | |
Domain ID constant for a geometry (SQL type GEOMETRY). | |
Domain ID constant for a Time (SQL type TIME). | |
Domain ID constant for a Timestamp (SQL type TIMESTAMP). | |
Domain ID constant for a timestamps with time zones (SQL type DATETIMEOFFSET). | |
Domain ID constant for a unsigned 8-bit integer (SQL type TINYINT). | |
Domain ID constant for a unsigned 64-bit integer (SQL type UNSIGNED BIGINT). | |
Domain ID constant for a unsigned 32-bit integer (SQL type UNSIGNED INTEGER). | |
Domain ID constant for a unsigned 16-bit integer (SQL type UNSIGNED SMALLINT). | |
Domain ID constant for a UniqueIdentifier (SQL type UNIQUEIDENTIFIER). | |
Domain ID constant for a variable-length character string of maximum size bytes (SQL type VARCHAR(size)). |
This interface contains constants to denote the various domains, and methods to extract information from a Domain object.
See the Connection interface for an example of creating a schema for a simple database.
Types can be classified as follows:
Integer Types:
Domain Constant | SQL Type | Value Range |
---|---|---|
BIT | BIT | 0 or 1 |
TINY | TINYINT | 0 to 255 (unsigned integer using 1 byte of storage) |
SHORT | SMALLINT | -32768 to 32767 (signed integer using 2 bytes of storage) |
UNSIGNED_SHORT | UNSIGNED SMALLINT | 0 to 65535 (unsigned integer using 2 bytes of storage) |
INTEGER | INTEGER | -231 to 231 - 1, or -2147483648 to 2147483647 (signed integer using 4 bytes of storage) |
UNSIGNED_INTEGER | UNSIGNED INTEGER | 0 to 232 - 1, or 0 to 4294967295 (unsigned integer using 4 bytes of storage) |
BIG | BIGINT | -263 to 263 - 1, or -9223372036854775808 to 9223372036854775807 (signed integer using 8 bytes of storage) |
UNSIGNED_BIG | UNSIGNED BIGINT | 0 to 264 - 1, or 0 to 18446744073709551615 (unsigned integer using 8 bytes of storage) |
Non-Integer Numeric Types:
Domain Constant | SQL Type | Value Range |
---|---|---|
REAL | REAL | -3.402823e+38 to 3.402823e+38, with numbers close to zero as small as 1.175495e-38 (single precision floating point number using 4 bytes of storage, rounding errors may occur after the sixth digit) |
DOUBLE | DOUBLE | -1.79769313486231e+308 to 1.79769313486231e+308, with numbers close to zero as small as 2.22507385850721e-308 (single precision floating point number using 8 bytes of storage, rounding errors may occur after the fifteenth digit) |
NUMERIC | NUMERIC(precision,scale) | any decimal numbers with precision (size) total digits and with scale digits after the decimal point (no rounding within precision) |
Character and Binary Types:
Domain Constant | SQL Type | Size Range |
---|---|---|
VARCHAR | VARCHAR(size) | 1 to 32767 bytes (characters are stored as 1-3 byte UTF-8 characters).When evaluating expressions, the maximum length for a temporary character value is 2048 bytes. |
LONGVARCHAR | LONG VARCHAR | Any length (memory permitting).The only operations allowed on LONG VARCHAR columns are to insert, update, or delete them, or to include them in the select-list of a query. |
BINARY | BINARY(size) | 1 to 32767 bytes.When evaluating expressions, the maximum length for a temporary character value is 2048 bytes. |
LONGBINARY | LONG BINARY | Any length (memory permitting).The only operations allowed on LONG BINARY columns are to insert, update, or delete them, or to include them in the select-list of a query. |
UUID | UNIQUEIDENTIFIER | always 16 bytes binary with special interpretation. |
Date and Time Types:
Domain Constant | SQL Type | Value |
---|---|---|
DATE | DATE | Year, month, day. |
TIME | TIME | Hour, minute, second, and fraction of a second. |
TIMESTAMP | TIMESTAMP | DATE and TIME. |
TIMESTAMP_ZONE | TIMESTAMP_ZONE | DATE and TIME with time zone. |
BIT columns are not nullable by default. All other types are nullable by default.
BIG variable
BINARY variable
BIT variable
DATE variable
DOMAIN_MAX variable
DOUBLE variable
INTEGER variable
LONGBINARY variable
LONGBINARYFILE variable
LONGVARCHAR variable
NUMERIC variable
REAL variable
SHORT variable
ST_GEOMETRY variable
TIME variable
TIMESTAMP variable
TIMESTAMP_ZONE variable
TINY variable
UNSIGNED_BIG variable
UNSIGNED_INTEGER variable
UNSIGNED_SHORT variable
UUID variable
VARCHAR variable
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |