WhamNAPI Data Types, Mappings and Type Indicators. 1
WhamNAPI Data Type
Indicators. 3
Data Type |
Size in bytes |
Comments |
CHAR(n) |
1-4088 |
Fixed length strings |
REAL |
4 |
Standard floating point value Precision: 6 digits Mantissa bits: 24 Max positive value: 3.402823466e+38 Min positive value: 1.175494351e-38 |
FLOAT |
8 |
Double precision floating point Precision: 15 digits Mantissa bits: 53 Max positive value: 1.7976931348623158e+308 Min positive value: 2.2250738585072014e-308 |
SMALLINT |
2 |
Exact numeric value with precision 5 and scale 0 Signed: -32,768 to +32,767, Unsigned: 0 to 65,535 |
INT |
4 |
Exact numeric value with precision 10 and scale 0 Signed: -2,147,483,648 to +2,147,483,647 Unsigned: 0 to 4,294,967,295 |
BIGINT |
8 |
Exact numeric value with precision 19 (if signed) or 20 (if unsigned) and scale 0 Signed: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Unsigned: 0 to 18,446,744,073,709,551,615 |
NUMERIC(x.y) |
(X+Y) |
Byte packed numeric data where X = number of digits to the left of decimal point, Y = number of digits to the right of decimal point (optional, default is 0) |
DATE |
8 |
Stored internally as YYYYMMDD |
DATETIME |
8 |
Stored internally as 8 bytes integer |
BLOB |
|
Binary large object |
CLOB |
|
Character large object |
BIT |
1 |
The BIT Data Type requires only one bit of storage. For a single BIT field, the left-most (high-order) bit is used. When BIT fields occur consecutively, they are stored internally 8 per byte, left to right. |
Data Types Category |
SQL Data Types |
Native Data Types |
Thunderbolt Engine Data Types |
Notes: Direct Translation? |
Numeric types |
BIGINT |
BIGNIT |
ID64 (64-bit signed integer) |
Yes |
|
|
|
IDU64 (64-bit unsigned integer) |
|
|
INT, INTEGER |
INT |
ID (32-bit signed integer) |
Yes |
|
|
|
IDU (32-bit unsigned integer) |
|
|
SMALLINT |
SMALLINT |
I (16-bit integer) |
Yes |
|
|
|
IU (16-bit unsigned integer) |
|
|
DECIMAL |
NUMERIC |
N(p,s) |
No |
|
NUMERIC |
NUMERIC |
N(p,s) |
Yes |
|
FLOAT |
FLOAT |
FD |
Yes |
|
REAL |
REAL |
F |
Yes |
String types |
CHAR |
CHAR |
X |
No, max chars record length limit (approx. 4000 bytes) |
|
VARCHAR |
VARCHAR |
VARCHAR |
Not fully supported |
|
NCHAR |
Not supported |
Not supported |
No UNICODE support |
Boolean type |
BOOLEAN |
BIT |
LOGICAL |
No |
Date/time types |
DATE |
DATE |
DATE |
No |
|
TIME |
Not supported |
Not supported |
|
|
TIMESTAMP |
TIMESTAMP |
DateTime |
No |
|
|
DATETIME |
|
|
Large object data types |
CLOB |
CLOB |
CLOB |
Yes |
|
BLOB |
BLOB |
BLOB |
Yes |
Interval types |
see SQL spec. |
Not supported |
Not supported |
|
Native Data Types |
OLE DB data type indicator[1] |
OLE DB column characteristics[2] |
ODBC
SQL type indicator |
ODBC
C Data Types |
JDBC
types |
BIGNIT |
DBTYPE_I8 |
|
SQL_BIGINT |
SQL_C_SBIGINT |
java.sql.Types.BIGINT |
BIGNIT |
DBTYPE_UI8 |
|
SQL_BIGINT |
SQL_C_UBIGINT |
java.sql.Types.BIGINT |
INT |
DBTYPE_I4 |
|
SQL_INTEGER |
SQL_C_SLONG |
java.sql.Types.INTEGER |
INT |
DBTYPE_UI4 |
|
SQL_INTEGER |
SQL_C_ULONG |
java.sql.Types.INTEGER |
SMALLINT |
DBTYPE_I2 |
|
SQL_SMALLINT |
SQL_C_SSHORT |
java.sql.Types.SMALLINT |
SMALLINT |
DBTYPE_UI2 |
|
SQL_SMALLINT |
SQL_C_USHORT |
java.sql.Types.SMALLINT |
NUMERIC |
DBTYPE_NUMERIC |
|
SQL_NUMERIC |
SQL_C_NUMERIC |
java.sql.Types.NUMERIC |
FLOAT |
DBTYPE_R8 |
|
SQL_DOUBLE |
SQL_C_DOUBLE |
java.sql.Types.DOUBLE |
REAL |
DBTYPE_R4 |
|
SQL_FLOAT |
SQL_C_FLOAT |
java.sql.Types.FLOAT |
CHAR |
DBTYPE_STR |
|
SQL_CHAR |
SQL_C_CHAR |
java.sql.Types.CHAR |
VARCHAR |
DBTYPE_STR |
|
SQL_VARCHAR |
SQL_C_CHAR |
java.sql.Types.CHAR |
BIT |
DBTYPE_BOOL |
|
SQL_BIT |
SQL_C_BIT |
java.sql.Types.BIT |
DATE |
DBTYPE_DBDATE |
|
SQL_DATE |
SQL_C_DATE |
java.sql.Types.DATE |
TIMESTAMP |
DBTYPE_DBTIMESTAMP |
|
SQL_TIMESTAMP |
SQL_C_TIMESTAMP |
java.sql.Types.TIMESTAMP |
DATETIME |
|
||||
CLOB |
DBTYPE_STR |
DBCOLUMNFLAGS_ISLONG |
SQL_LONGVARCHAR |
SQL_C_CHAR |
java.sql.Types.CHAR |
|
DBTYPE_STR | DBTYPE_BYREF[3] |
DBCOLUMNFLAGS_ISLONG |
SQL_LONGVARCHAR |
SQL_C_CHAR |
java.sql.Types.CHAR |
BLOB |
DBTYPE_BYTES |
DBCOLUMNFLAGS_ISLONG |
SQL_LONGVARBINARY |
SQL_C_BINARY |
java.sql.Types.BINARY |
[1] OLE DB data type indicator can be obtained by following ways:
1. The value of DATA_TYPE column of the result set generated by SCEHAM COLUMNS command
2. The value of piDataType pointer returned by tbdrv_get_colspec()
3. The value of piOLEDBDataType pointer returned by tbdrv_get_colval()
4. The values of iOLEDBDataType for structure TBDRV_COLUMN_SPEC returned by tbdrv_get_colspec_ex()
[2] OLE DB column characteristics is a bitmask that describes column characteristics and can be obtained by following ways:
1. The value of COLUMN_FLAG column of the result set generated by SCEHAM COLUMNS command
2. The value of piNullable poniter reurned by tbdrv_get_colspec()
3. The values of iNullable for structure TBDRV_COLUMN_SPEC returned by tbdrv_get_colspec_ex()
[3] The data type indicator of column contains document content in the result set generated by
URLCONTENT(.) on the SELECT column list.
Syntax of URLCONTENT in SELECT column lists in SELECT command:
Select URLCONTENT(destination, 'bucketfilename') . from ..
Where:
bucketfilename: the field name contains the '.tsi' file information (ie relative '.tsi' file name offset and length) is required.
destination: the field name as a place holder which stores the pointer to the content for further process by tbdrv_read_clob_by_doc_data().
Note: 'destination' and 'bucketfilename' can't be the same.
Copyright © 2019 , WhamTech, Inc. All rights reserved. This
document is provided for information purposes only and the contents hereof are
subject to change without notice. Names may be
trademarks of their respective owners.