Files | |
file | qof-sqlite.h |
Public interface of qof-backend-sqlite. | |
Functions | |
void | qof_sqlite_provider_init (void) |
Initialises the SQLite backend. |
SQLite is typeless so the types defined for the various QOF parameter types act as more of a guide than a rule.
CREATE TABLE sqlite_kvp ("kvp_id int primary key not null", "guid char(32)", "path mediumtext", "type mediumtext", "value text", END_DB_VERSION);
void qof_sqlite_provider_init | ( | void | ) |
Initialises the SQLite backend.
Sets QOF SQLite Backend Version 0.3, access method = sqlite:
The ID in all SQLite tables created by QOF is the GUID of the entity, expressed as a hexadecimal string.
The version number only changes if:
Initialises the backend and provides access to the functions that will load and save the data. Initialises default values for the QofBackendOption KvpFrame.
Instance KvpFrames are retrieved and stored as a separate table in the same SQLite file "sqlite_kvp". The primary key is an internal, sequential, identifier that does not need to be exposed. Each KvpValue is one record in the kvp table - frames are just a type of value. Records include fields for the path, type and value of the KvpValue as well as the GUID of the entity that holds the value.
Table name: sqlite_kvp Table values: internal_id, guid_as_string, path, type, value
At present, qof_sqlite has no QofBackendOption options and therefore no strings that are translatable.
Definition at line 1065 of file qof-sqlite.c.
01066 { 01067 QofBackendProvider *prov; 01068 01069 ENTER (" "); 01070 bindtextdomain (PACKAGE, LOCALE_DIR); 01071 qof_sql_entity_set_kvp_tablename (QSQL_KVP_TABLE); 01072 prov = g_new0 (QofBackendProvider, 1); 01073 prov->provider_name = "QOF SQLite Backend Version 0.4"; 01074 prov->access_method = ACCESS_METHOD; 01075 prov->partial_book_supported = TRUE; 01076 prov->backend_new = qsql_backend_new; 01077 prov->check_data_type = qsql_determine_file_type; 01078 prov->provider_free = qsql_provider_free; 01079 qof_backend_register_provider (prov); 01080 LEAVE (" "); 01081 }