Interface to SQLite. Loads database records into the in-memory database and saves in-memory database changes into the database. Reads and writes database blobs.
More...
Go to the source code of this file.
Interface to SQLite. Loads database records into the in-memory database and saves in-memory database changes into the database. Reads and writes database blobs.
- Date
- 01/01/2017
- Author
- Ocean Blue
BOOLEAN SQLite_CreateBackup |
( |
const char * |
filename | ) |
|
Create backup 'filename'.
- Parameters
-
filename | Database file or NULL for memory backup |
- Returns
- TRUE on success, FALSE on failure
U32BIT SQLite_GetBlobSize |
( |
U32BIT |
id | ) |
|
Get size of blob 'id'.
- Parameters
-
- Returns
- Size on success, 0 on failure
BOOLEAN SQLite_Initialise |
( |
void |
| ) |
|
Initialise SQLite interface.
- Returns
- TRUE on success, FALSE on failure
BOOLEAN SQLite_Open |
( |
const char * |
filename | ) |
|
Open database 'filename'. The database is created and initialised if it does not exist. The database is upgraded if it is older than the current version. The in-memory database is cleared and database records are loaded into it.
- Parameters
-
- Returns
- TRUE on success, FALSE on failure
U32BIT SQLite_ReadBlob |
( |
U32BIT |
id, |
|
|
void * |
data, |
|
|
U32BIT |
data_size |
|
) |
| |
Read blob 'id' into 'data'.
- Parameters
-
id | Blob id |
data | Data buffer |
data_size | Size of 'data' |
- Returns
- Size read on success, 0 on failure
void SQLite_RemoveBackup |
( |
const char * |
filename | ) |
|
Remove backup 'filename'.
- Parameters
-
filename | Database file or NULL for memory backup |
filename | Database file or NULL for memory backup |
- Returns
- TRUE on success, FALSE on failure
BOOLEAN SQLite_Reset |
( |
void |
| ) |
|
Reset database and clear in-memory database. Database closed on failure.
- Returns
- TRUE on success, FALSE on failure
BOOLEAN SQLite_RestoreBackup |
( |
const char * |
filename, |
|
|
BOOLEAN |
check_exists_only |
|
) |
| |
Restore backup 'filename'.
- Parameters
-
filename | Database file or NULL for memory backup |
check_exists_only | Only check whether the backup exists |
- Returns
- TRUE on success, FALSE on failure
BOOLEAN SQLite_SaveDatabaseRecords |
( |
void |
| ) |
|
Save in-memory database changes into the database.
- Returns
- TRUE on success, FALSE on failure
BOOLEAN SQLite_WriteBlob |
( |
U32BIT |
id, |
|
|
const void * |
data, |
|
|
U32BIT |
data_size |
|
) |
| |
Write 'data' into blob 'id'.
- Parameters
-
id | Blob id |
data | Data buffer |
data_size | Size of 'data' |
- Returns
- TRUE on success, FALSE on failure