SQLite Data Packing

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

Mappings Between Uniface Packing Codes and SQLite Storage Class
Uniface Packing Code SQLite Storage Class
B INTEGER
B1-B3 TEXT
B4-B5 INTEGER
C1-C255 TEXT
C* TEXT
D TEXT
D1-D16 TEXT
E TEXT
E13 TEXT; stores ticks
E1-E16 TEXT
F REAL
F4,F8 REAL
I1-I8 INTEGER
J1-J18 INTEGER
J19-J32 TEXT
M1-M8 REAL
N REAL
N1-N32 REAL
O1-O18 INTEGER
O19-O32 TEXT
P1-P8 INTEGER
P9-P16 REAL
Q1-Q8 INTEGER
Q9-Q16 REAL
R* BLOB
T TEXT
T6 TEXT; stores ticks
T1-T8 TEXT
U1-U255 TEXT
U* TEXT
VC1-VC* TEXT
VR1-VR* BLOB
VU1-VU* TEXT
VW1-VW... TEXT
W1-W255 TEXT
W255-higher TEXT
W* BLOB
Y1-Y32 BLOB

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.