aboutsummaryrefslogtreecommitdiff
path: root/src/global.c
diff options
context:
space:
mode:
authordrh <>2021-07-30 23:30:30 +0000
committerdrh <>2021-07-30 23:30:30 +0000
commitc2df4d6adb44e5f9587bf962c917c46c603825c9 (patch)
tree463be0579cf67d7eae8f67743f9e5c3c715b7936 /src/global.c
parente48f261ebfd36b4935c2d700269790239dac37e5 (diff)
downloadsqlite-c2df4d6adb44e5f9587bf962c917c46c603825c9.tar.gz
sqlite-c2df4d6adb44e5f9587bf962c917c46c603825c9.zip
Recognize certain standard datatypes ("INT", "INTEGER", "REAL", "TEXT", and
"BLOB") and if a column has one of those datatypes, store the type part of the bit-field information in the Column structure to save space. FossilOrigin-Name: d2da62a9df63036b02dadca3798de9e623c2680b3ef0c37d2b18bb88693afd7f
Diffstat (limited to 'src/global.c')
-rw-r--r--src/global.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/global.c b/src/global.c
index 4648c26d9..a1398fef5 100644
--- a/src/global.c
+++ b/src/global.c
@@ -347,3 +347,23 @@ const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER;
** Name of the default collating sequence
*/
const char sqlite3StrBINARY[] = "BINARY";
+
+/*
+** Standard typenames. These names must match the COLTYPE_* definitions.
+** Adjust the SQLITE_N_STDTYPE value if adding or removing entries.
+*/
+const unsigned char sqlite3StdTypeLen[] = { 4, 3, 7, 4, 4 };
+const char sqlite3StdTypeAffinity[] = {
+ SQLITE_AFF_BLOB,
+ SQLITE_AFF_INTEGER,
+ SQLITE_AFF_INTEGER,
+ SQLITE_AFF_REAL,
+ SQLITE_AFF_TEXT
+};
+const char *sqlite3StdType[] = {
+ "BLOB",
+ "INT",
+ "INTEGER",
+ "REAL",
+ "TEXT"
+};