SQLite Data Packing

The table describes how Uniface packing codes are mapped to SQLite storage formats

Mappings Between Uniface Packing Codes, SQLite Typename, and SQLite Storage Class
Uniface Packing Code SQLite Typename SQLite Storage Class
B Boolean integer INTEGER
B1-B3 Boolean text TEXT
B4-B5 Boolean integer INTEGER
Cn Char TEXT
C* Varchar TEXT
D, D1-D13 Date TEXT
E, E1-12 Datetime TEXT
E13 Datetime TEXT; stores ticks
F Numeric REAL
F4,F8 Double Precision REAL
I1-I8 Integer INTEGER
M1-M8 Money REAL
(N) Cn Numeric REAL
N n Numeric REAL
O1-O18 Integer INTEGER
O19-O32 Numeric TEXT
P1-P8 Integer INTEGER
P9-P16 Double Precision REAL
Q1-Q18 Integer INTEGER
Q19-Q32 Double Precision REAL
R1-R* Blob BLOB
SC* Clob TEXT
SR* Blob BLOB
SU* Clob TEXT
SW* NClob TEXT
T, T1-T5 Time TEXT
T6 Datetime TEXT; stores ticks
Un Char TEXT
U* Varchar TEXT
VC1-VC* Varchar TEXT
VR1-VR* Blob BLOB
VWn Nvarchar TEXT
VW* Blob BLOB
Wn Nchar TEXT
W* Blob BLOB
Y1 Null NULL
Y2-Y32 Blob BLOB

Note: Where an n or m is used, you need to substitute that with a number.

Overflow Tables

The following Uniface packing codes require an overflow table when the amount of data to be inserted into the field exceeds 8192 bytes:

  • (V)C*
  • (V)W*
  • (V)U*
  • (V)R*

SQLite Storage Classes

SQLite Storage Formats
Storage format Description
TEXT The TEXT storage class is used for storing fixed- and variable-size character strings, time values, date values, date time values, and ASCII boolean values (0|1, F | T, N | Y).

The database encoding is UTF-8.Time values are stored in the ASCII format hh:nn:ss.

Date values are stored in the ASCII format yyyy-mm-dd.

Datetime values are stored in the ASCII format yyyy-mm-dd hh:nn:ss.

Note:  If you need to store date or dateline data that includes ticks, use the E13 or T6 packing codes.

INTEGER

The INTEGER storage class is used to store integer values between -264+1 and 264-1. The storage size varies from 1 to 8 bytes depending on the magnitude of the value.

REAL The REAL storage class is used to store floating point values. The value is stored as an 8-byte IEEE floating point number.
BLOB The BLOB storage class is used for Image data and raw binary data.
NULL The NULL storage class is used for NULL values. For more information on NULL handling, consult the SQLite documentation.