Unify Framework Lib 1.6.0
datastore_internals.h File Reference
#include <sqlite3.h>

Go to the source code of this file.

Macros

#define DATASTORE_TABLE_INT   "uic_kv_int"
 Table for storing integers. More...
 
#define DATASTORE_TABLE_BLOB   "uic_kv_blob"
 Table for storing arrays. More...
 
#define DATASTORE_TABLE_ATTRIBUTES   "uic_attributes"
 Table for storing the attribute store. More...
 

Functions

int datastore_exec_sql (const char *sql)
 Helper function to execute SQL statement and check for errors. More...
 
sl_status_t datastore_table_init ()
 Generic datastore table initialization. More...
 
sl_status_t datastore_attribute_table_init ()
 Attribute table initialization. More...
 
sl_status_t datastore_attribute_statement_init ()
 Statement initialization for the attribute table. More...
 
sl_status_t datastore_attribute_statement_teardown ()
 Statement teardown for the attribute table. More...
 

Variables

sqlite3 * db
 

Macro Definition Documentation

◆ DATASTORE_TABLE_ATTRIBUTES

#define DATASTORE_TABLE_ATTRIBUTES   "uic_attributes"

Table for storing the attribute store.

◆ DATASTORE_TABLE_BLOB

#define DATASTORE_TABLE_BLOB   "uic_kv_blob"

Table for storing arrays.

◆ DATASTORE_TABLE_INT

#define DATASTORE_TABLE_INT   "uic_kv_int"

Table for storing integers.

Function Documentation

◆ datastore_attribute_statement_init()

sl_status_t datastore_attribute_statement_init ( )

Statement initialization for the attribute table.

Returns
SL_STATUS_OK on success
SL_STATUS_FAIL on failure

◆ datastore_attribute_statement_teardown()

sl_status_t datastore_attribute_statement_teardown ( )

Statement teardown for the attribute table.

Returns
SL_STATUS_OK

◆ datastore_attribute_table_init()

sl_status_t datastore_attribute_table_init ( )

Attribute table initialization.

Returns
SL_STATUS_OK on success
SL_STATUS_FAIL on failure

◆ datastore_exec_sql()

int datastore_exec_sql ( const char *  sql)

Helper function to execute SQL statement and check for errors.

Parameters
sqlSQL-query to execute
Returns
int sqlite3 error code

◆ datastore_table_init()

sl_status_t datastore_table_init ( )

Generic datastore table initialization.

Returns
SL_STATUS_OK on success
SL_STATUS_FAIL on failure

Variable Documentation

◆ db

sqlite3* db
extern