#define PragTyp_ACTIVATE_EXTENSIONS 0
#define PragTyp_ANALYSIS_LIMIT 1
#define PragTyp_HEADER_VALUE 2
#define PragTyp_AUTO_VACUUM 3
#define PragTyp_FLAG 4
#define PragTyp_BUSY_TIMEOUT 5
#define PragTyp_CACHE_SIZE 6
#define PragTyp_CACHE_SPILL 7
#define PragTyp_CASE_SENSITIVE_LIKE 8
#define PragTyp_COLLATION_LIST 9
#define PragTyp_COMPILE_OPTIONS 10
#define PragTyp_DATA_STORE_DIRECTORY 11
#define PragTyp_DATABASE_LIST 12
#define PragTyp_DEFAULT_CACHE_SIZE 13
#define PragTyp_ENCODING 14
#define PragTyp_FOREIGN_KEY_CHECK 15
#define PragTyp_FOREIGN_KEY_LIST 16
#define PragTyp_FUNCTION_LIST 17
#define PragTyp_HARD_HEAP_LIMIT 18
#define PragTyp_INCREMENTAL_VACUUM 19
#define PragTyp_INDEX_INFO 20
#define PragTyp_INDEX_LIST 21
#define PragTyp_INTEGRITY_CHECK 22
#define PragTyp_JOURNAL_MODE 23
#define PragTyp_JOURNAL_SIZE_LIMIT 24
#define PragTyp_LOCK_PROXY_FILE 25
#define PragTyp_LOCKING_MODE 26
#define PragTyp_PAGE_COUNT 27
#define PragTyp_MMAP_SIZE 28
#define PragTyp_MODULE_LIST 29
#define PragTyp_OPTIMIZE 30
#define PragTyp_PAGE_SIZE 31
#define PragTyp_PRAGMA_LIST 32
#define PragTyp_SECURE_DELETE 33
#define PragTyp_SHRINK_MEMORY 34
#define PragTyp_SOFT_HEAP_LIMIT 35
#define PragTyp_SYNCHRONOUS 36
#define PragTyp_TABLE_INFO 37
#define PragTyp_TABLE_LIST 38
#define PragTyp_TEMP_STORE 39
#define PragTyp_TEMP_STORE_DIRECTORY 40
#define PragTyp_THREADS 41
#define PragTyp_WAL_AUTOCHECKPOINT 42
#define PragTyp_WAL_CHECKPOINT 43
#define PragTyp_LOCK_STATUS 44
#define PragTyp_STATS 45
#define PragFlg_NeedSchema 0x01
#define PragFlg_NoColumns 0x02
#define PragFlg_NoColumns1 0x04
#define PragFlg_ReadOnly 0x08
#define PragFlg_Result0 0x10
#define PragFlg_Result1 0x20
#define PragFlg_SchemaOpt 0x40
#define PragFlg_SchemaReq 0x80
static const char *const pragCName[] = {
"id",
"seq",
"table",
"from",
"to",
"on_update",
"on_delete",
"match",
"cid",
"name",
"type",
"notnull",
"dflt_value",
"pk",
"hidden",
"schema",
"name",
"type",
"ncol",
"wr",
"strict",
"seqno",
"cid",
"name",
"desc",
"coll",
"key",
"name",
"builtin",
"type",
"enc",
"narg",
"flags",
"tbl",
"idx",
"wdth",
"hght",
"flgs",
"seq",
"name",
"unique",
"origin",
"partial",
"table",
"rowid",
"parent",
"fkid",
"seq",
"name",
"file",
"busy",
"log",
"checkpointed",
"database",
"status",
"cache_size",
"timeout",
};
typedef struct PragmaName {
const char *const zName;
u8 ePragTyp;
u8 mPragFlg;
u8 iPragCName;
u8 nPragCName;
u64 iArg;
} PragmaName;
static const PragmaName aPragmaName[] = {
#if defined(SQLITE_ENABLE_CEROD)
{ "activate_extensions",
PragTyp_ACTIVATE_EXTENSIONS,
0,
0, 0,
0 },
#endif
{ "analysis_limit",
PragTyp_ANALYSIS_LIMIT,
PragFlg_Result0,
0, 0,
0 },
#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)
{ "application_id",
PragTyp_HEADER_VALUE,
PragFlg_NoColumns1|PragFlg_Result0,
0, 0,
BTREE_APPLICATION_ID },
#endif
#if !defined(SQLITE_OMIT_AUTOVACUUM)
{ "auto_vacuum",
PragTyp_AUTO_VACUUM,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
#if !defined(SQLITE_OMIT_AUTOMATIC_INDEX)
{ "automatic_index",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_AutoIndex },
#endif
#endif
{ "busy_timeout",
PragTyp_BUSY_TIMEOUT,
PragFlg_Result0,
56, 1,
0 },
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
{ "cache_size",
PragTyp_CACHE_SIZE,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "cache_spill",
PragTyp_CACHE_SPILL,
PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA)
{ "case_sensitive_like",
PragTyp_CASE_SENSITIVE_LIKE,
PragFlg_NoColumns,
0, 0,
0 },
#endif
{ "cell_size_check",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_CellSizeCk },
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "checkpoint_fullfsync",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_CkptFullFSync },
#endif
#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)
{ "collation_list",
PragTyp_COLLATION_LIST,
PragFlg_Result0,
38, 2,
0 },
#endif
#if !defined(SQLITE_OMIT_COMPILEOPTION_DIAGS)
{ "compile_options",
PragTyp_COMPILE_OPTIONS,
PragFlg_Result0,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "count_changes",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_CountRows },
#endif
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && SQLITE_OS_WIN
{ "data_store_directory",
PragTyp_DATA_STORE_DIRECTORY,
PragFlg_NoColumns1,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)
{ "data_version",
PragTyp_HEADER_VALUE,
PragFlg_ReadOnly|PragFlg_Result0,
0, 0,
BTREE_DATA_VERSION },
#endif
#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)
{ "database_list",
PragTyp_DATABASE_LIST,
PragFlg_Result0,
47, 3,
0 },
#endif
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && !defined(SQLITE_OMIT_DEPRECATED)
{ "default_cache_size",
PragTyp_DEFAULT_CACHE_SIZE,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,
55, 1,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
{ "defer_foreign_keys",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_DeferFKs },
#endif
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "empty_result_callbacks",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_NullCallback },
#endif
#if !defined(SQLITE_OMIT_UTF16)
{ "encoding",
PragTyp_ENCODING,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
{ "foreign_key_check",
PragTyp_FOREIGN_KEY_CHECK,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_Result1|PragFlg_SchemaOpt,
43, 4,
0 },
#endif
#if !defined(SQLITE_OMIT_FOREIGN_KEY)
{ "foreign_key_list",
PragTyp_FOREIGN_KEY_LIST,
PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
0, 8,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
{ "foreign_keys",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_ForeignKeys },
#endif
#endif
#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)
{ "freelist_count",
PragTyp_HEADER_VALUE,
PragFlg_ReadOnly|PragFlg_Result0,
0, 0,
BTREE_FREE_PAGE_COUNT },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "full_column_names",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_FullColNames },
{ "fullfsync",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_FullFSync },
#endif
#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)
#if !defined(SQLITE_OMIT_INTROSPECTION_PRAGMAS)
{ "function_list",
PragTyp_FUNCTION_LIST,
PragFlg_Result0,
27, 6,
0 },
#endif
#endif
{ "hard_heap_limit",
PragTyp_HARD_HEAP_LIMIT,
PragFlg_Result0,
0, 0,
0 },
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
#if !defined(SQLITE_OMIT_CHECK)
{ "ignore_check_constraints",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_IgnoreChecks },
#endif
#endif
#if !defined(SQLITE_OMIT_AUTOVACUUM)
{ "incremental_vacuum",
PragTyp_INCREMENTAL_VACUUM,
PragFlg_NeedSchema|PragFlg_NoColumns,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)
{ "index_info",
PragTyp_INDEX_INFO,
PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
21, 3,
0 },
{ "index_list",
PragTyp_INDEX_LIST,
PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
38, 5,
0 },
{ "index_xinfo",
PragTyp_INDEX_INFO,
PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
21, 6,
1 },
#endif
#if !defined(SQLITE_OMIT_INTEGRITY_CHECK)
{ "integrity_check",
PragTyp_INTEGRITY_CHECK,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_Result1|PragFlg_SchemaOpt,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
{ "journal_mode",
PragTyp_JOURNAL_MODE,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq,
0, 0,
0 },
{ "journal_size_limit",
PragTyp_JOURNAL_SIZE_LIMIT,
PragFlg_Result0|PragFlg_SchemaReq,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "legacy_alter_table",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_LegacyAlter },
#endif
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && SQLITE_ENABLE_LOCKING_STYLE
{ "lock_proxy_file",
PragTyp_LOCK_PROXY_FILE,
PragFlg_NoColumns1,
0, 0,
0 },
#endif
#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
{ "lock_status",
PragTyp_LOCK_STATUS,
PragFlg_Result0,
53, 2,
0 },
#endif
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
{ "locking_mode",
PragTyp_LOCKING_MODE,
PragFlg_Result0|PragFlg_SchemaReq,
0, 0,
0 },
{ "max_page_count",
PragTyp_PAGE_COUNT,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq,
0, 0,
0 },
{ "mmap_size",
PragTyp_MMAP_SIZE,
0,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)
#if !defined(SQLITE_OMIT_VIRTUALTABLE)
#if !defined(SQLITE_OMIT_INTROSPECTION_PRAGMAS)
{ "module_list",
PragTyp_MODULE_LIST,
PragFlg_Result0,
9, 1,
0 },
#endif
#endif
#endif
{ "optimize",
PragTyp_OPTIMIZE,
PragFlg_Result1|PragFlg_NeedSchema,
0, 0,
0 },
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
{ "page_count",
PragTyp_PAGE_COUNT,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq,
0, 0,
0 },
{ "page_size",
PragTyp_PAGE_SIZE,
PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
#if defined(SQLITE_DEBUG)
{ "parser_trace",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_ParserTrace },
#endif
#endif
#if !defined(SQLITE_OMIT_INTROSPECTION_PRAGMAS)
{ "pragma_list",
PragTyp_PRAGMA_LIST,
PragFlg_Result0,
9, 1,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "query_only",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_QueryOnly },
#endif
#if !defined(SQLITE_OMIT_INTEGRITY_CHECK)
{ "quick_check",
PragTyp_INTEGRITY_CHECK,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_Result1|PragFlg_SchemaOpt,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "read_uncommitted",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_ReadUncommit },
{ "recursive_triggers",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_RecTriggers },
{ "reverse_unordered_selects",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_ReverseOrder },
#endif
#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)
{ "schema_version",
PragTyp_HEADER_VALUE,
PragFlg_NoColumns1|PragFlg_Result0,
0, 0,
BTREE_SCHEMA_VERSION },
#endif
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
{ "secure_delete",
PragTyp_SECURE_DELETE,
PragFlg_Result0,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "short_column_names",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_ShortColNames },
#endif
{ "shrink_memory",
PragTyp_SHRINK_MEMORY,
PragFlg_NoColumns,
0, 0,
0 },
{ "soft_heap_limit",
PragTyp_SOFT_HEAP_LIMIT,
PragFlg_Result0,
0, 0,
0 },
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
#if defined(SQLITE_DEBUG)
{ "sql_trace",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_SqlTrace },
#endif
#endif
#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS) && defined(SQLITE_DEBUG)
{ "stats",
PragTyp_STATS,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq,
33, 5,
0 },
#endif
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
{ "synchronous",
PragTyp_SYNCHRONOUS,
PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,
0, 0,
0 },
#endif
#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)
{ "table_info",
PragTyp_TABLE_INFO,
PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
8, 6,
0 },
{ "table_list",
PragTyp_TABLE_LIST,
PragFlg_NeedSchema|PragFlg_Result1,
15, 6,
0 },
{ "table_xinfo",
PragTyp_TABLE_INFO,
PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
8, 7,
1 },
#endif
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
{ "temp_store",
PragTyp_TEMP_STORE,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
0 },
{ "temp_store_directory",
PragTyp_TEMP_STORE_DIRECTORY,
PragFlg_NoColumns1,
0, 0,
0 },
#endif
{ "threads",
PragTyp_THREADS,
PragFlg_Result0,
0, 0,
0 },
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "trusted_schema",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_TrustedSchema },
#endif
#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)
{ "user_version",
PragTyp_HEADER_VALUE,
PragFlg_NoColumns1|PragFlg_Result0,
0, 0,
BTREE_USER_VERSION },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
#if defined(SQLITE_DEBUG)
{ "vdbe_addoptrace",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_VdbeAddopTrace },
{ "vdbe_debug",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_SqlTrace|SQLITE_VdbeListing|SQLITE_VdbeTrace },
{ "vdbe_eqp",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_VdbeEQP },
{ "vdbe_listing",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_VdbeListing },
{ "vdbe_trace",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_VdbeTrace },
#endif
#endif
#if !defined(SQLITE_OMIT_WAL)
{ "wal_autocheckpoint",
PragTyp_WAL_AUTOCHECKPOINT,
0,
0, 0,
0 },
{ "wal_checkpoint",
PragTyp_WAL_CHECKPOINT,
PragFlg_NeedSchema,
50, 3,
0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ "writable_schema",
PragTyp_FLAG,
PragFlg_Result0|PragFlg_NoColumns1,
0, 0,
SQLITE_WriteSchema|SQLITE_NoSchemaError },
#endif
};