QOF
0.7.5
|
Public interface of qof-backend-sqlite. More...
#include "config.h"
#include <errno.h>
#include <stdlib.h>
#include <time.h>
#include <glib/gstdio.h>
#include <sqlite.h>
#include <glib.h>
#include <libintl.h>
#include "qof.h"
Go to the source code of this file.
Macros | |
#define | _(String) dgettext (GETTEXT_PACKAGE, String) |
#define | ACCESS_METHOD "sqlite" |
#define | PRIORITY_HIGH 9 |
#define | PRIORITY_STANDARD 5 |
#define | PRIORITY_LOW 0 |
#define | QSQL_ERROR -1 |
#define | QSQL_KVP_TABLE "sqlite_kvp" |
#define | END_DB_VERSION " dbversion int );" |
Enumerations | |
enum | QsqlStatementType { SQL_NONE = 0, SQL_CREATE, SQL_LOAD, SQL_WRITE, SQL_INSERT, SQL_DELETE, SQL_UPDATE } |
Functions | |
static gchar * | add_to_sql (gchar *sql_str, const gchar *add) |
static QofIdTypeConst | kvp_value_to_qof_type_helper (KvpValueType n) |
Map a KvpValue to a QofIdType. | |
static KvpValueType | sql_to_kvp_helper (const gchar *type_string) |
KvpValue * | string_to_kvp_value (const gchar *content, KvpValueType type) |
Convert a string value into KvpValue. | |
static void | kvpvalue_to_sql (const gchar *key, KvpValue *val, gpointer builder) |
static gchar * | string_param_to_sql (QofParam *param) |
static void | create_param_list (QofParam *param, gpointer builder) |
list just the parameter names | |
static void | create_each_param (QofParam *param, gpointer builder) |
static void | delete_event (QofEntity *ent, QofEventId event_type, gpointer handler_data, gpointer event_data) |
use the new-style event handlers for insert and update insert runs after QOF_EVENT_CREATE delete runs before QOF_EVENT_DESTROY | |
static void | create_event (QofEntity *ent, QofEventId event_type, gpointer handler_data, gpointer event_data) |
static void | qsql_modify (QofBackend *be, QofInstance *inst) |
static gint | record_foreach (gpointer builder, gint col_num, gchar **strings, gchar **columnNames) |
static void | string_param_foreach (QofParam *param, gpointer builder) |
static void | update_param_foreach (QofParam *param, gpointer builder) |
static void | update_dirty (gpointer value, gpointer builder) |
static gint | create_dirty_list (gpointer builder, gint col_num, gchar **strings, gchar **columnNames) |
static gint | mark_entity (gpointer builder, gint col_num, gchar **strings, gchar **columnNames) |
static void | qsql_create (QofBackend *be, QofInstance *inst) |
static void | check_state (QofEntity *ent, gpointer builder) |
static gint | build_kvp_table (gpointer builder, gint col_num, gchar **strings, gchar **columnNames) |
chekc kvp data once per record | |
static void | qsql_load_kvp (QSQLiteBackend *qsql_be) |
static void | qsql_class_foreach (QofObject *obj, gpointer data) |
static void | qsql_backend_createdb (QofBackend *be, QofSession *session) |
static void | qsql_backend_opendb (QofBackend *be, QofSession *session) |
static void | qsqlite_session_begin (QofBackend *be, QofSession *session, const gchar *book_path, gboolean ignore_lock, gboolean create_if_nonexistent) |
static void | qsqlite_db_load (QofBackend *be, QofBook *book) |
static void | qsqlite_write_db (QofBackend *be, QofBook *book) |
static gboolean | qsql_determine_file_type (const gchar *path) |
static void | qsqlite_session_end (QofBackend *be) |
static void | qsqlite_destroy_backend (QofBackend *be) |
static void | qsql_provider_free (QofBackendProvider *prov) |
static QofBackend * | qsql_backend_new (void) |
Starts the backend and creates the context. | |
void | qof_sqlite_provider_init (void) |
Initialises the SQLite backend. |
Variables | |
static QofLogModule | log_module = QOF_MOD_SQLITE |
static gboolean | loading = FALSE |
Public interface of qof-backend-sqlite.
Definition in file qof-sqlite.c.
#define PRIORITY_HIGH 9 |
Indicates an item with high priority.
Definition at line 43 of file qof-sqlite.c.
#define PRIORITY_LOW 0 |
Indicates a low priority item.
Definition at line 47 of file qof-sqlite.c.
#define PRIORITY_STANDARD 5 |
Indicates an item with default priority.
Definition at line 45 of file qof-sqlite.c.
#define QSQL_ERROR -1 |
Indicate an error to sqlite
Definition at line 49 of file qof-sqlite.c.
#define QSQL_KVP_TABLE "sqlite_kvp" |
One KVP table per file for all instances.
Definition at line 51 of file qof-sqlite.c.
enum QsqlStatementType |
Definition at line 58 of file qof-sqlite.c.
|
static |
chekc kvp data once per record
creates a new KvpFrame as data for a GHashTable with the guid as key
Definition at line 1076 of file qof-sqlite.c.
|
static |
create the sql for each parameter
Definition at line 447 of file qof-sqlite.c.
|
static |
receives QSQLiteBackend, passes on QsqlBuilder
Definition at line 548 of file qof-sqlite.c.
|
static |
list just the parameter names
Definition at line 419 of file qof-sqlite.c.
|
static |
use the new-style event handlers for insert and update insert runs after QOF_EVENT_CREATE delete runs before QOF_EVENT_DESTROY
Definition at line 499 of file qof-sqlite.c.
|
static |
Map a KvpValue to a QofIdType.
Definition at line 145 of file qof-sqlite.c.
|
static |
returns the VALUES for INSERT in pre-defined order
Definition at line 316 of file qof-sqlite.c.
|
static |
Starts the backend and creates the context.
Definition at line 1446 of file qof-sqlite.c.
|
static |
receives QSQLiteBackend from QofBackend
Definition at line 1168 of file qof-sqlite.c.
|
static |
only call once per book
Definition at line 1127 of file qof-sqlite.c.
|
static |
Definition at line 713 of file qof-sqlite.c.
|
static |
Definition at line 200 of file qof-sqlite.c.
KvpValue* string_to_kvp_value | ( | const gchar * | content, |
KvpValueType | type | ||
) |
Convert a string value into KvpValue.
Definition at line 223 of file qof-sqlite.c.