DungeonCrawl
|
Exposes functions for working with the database. More...
#include "../../include/sqlite3.h"
Go to the source code of this file.
Data Structures | |
struct | db_connection_t |
This struct is used for the database connection in SQLite. More... |
Macros | |
#define | DB_OPEN_STATUS_SUCCESS 0 |
#define | DB_OPEN_STATUS_FAILURE 1 |
#define | DB_BUILD_DIR_PATH(database) |
#define | DB_RESOURCE_PATH(dir, database) |
#define | DB_RESOURCE_PATH_UP(dir, database) |
Typedefs | |
typedef enum db_type_t | db_type_t |
Enumerations | |
enum | db_type_t { DB_GAME , DB_LOCAL } |
Functions | |
int | db_open (db_connection_t *db_connection, const char *db_name) |
This function is for the opening of the database. | |
void | db_close (db_connection_t *db_connection) |
This function is for the closing of the database. | |
int | db_is_open (const db_connection_t *db_connection) |
This function is to check if the database is open. | |
int | db_open_multiple_access (db_connection_t *db_connection, db_type_t type) |
This function is for the opening of the database with multiple access. |
Exposes functions for working with the database.
Definition in file database.h.
#define DB_BUILD_DIR_PATH | ( | database | ) |
Definition at line 14 of file database.h.
#define DB_OPEN_STATUS_FAILURE 1 |
Definition at line 11 of file database.h.
#define DB_OPEN_STATUS_SUCCESS 0 |
Definition at line 10 of file database.h.
#define DB_RESOURCE_PATH | ( | dir, | |
database ) |
Definition at line 15 of file database.h.
#define DB_RESOURCE_PATH_UP | ( | dir, | |
database ) |
Definition at line 16 of file database.h.
enum db_type_t |
Definition at line 28 of file database.h.
void db_close | ( | db_connection_t * | db_connection | ) |
This function is for the closing of the database.
db_connection | the database conncetion |
Definition at line 22 of file database.c.
int db_is_open | ( | const db_connection_t * | db_connection | ) |
This function is to check if the database is open.
db_connection | the database connection |
Definition at line 27 of file database.c.
int db_open | ( | db_connection_t * | db_connection, |
const char * | db_name ) |
This function is for the opening of the database.
db_connection | the database connection |
db_name | the path name of the database |
Definition at line 12 of file database.c.
int db_open_multiple_access | ( | db_connection_t * | db_connection, |
db_type_t | type ) |
This function is for the opening of the database with multiple access.
db_connection | the database connection |
type | the type of the database |
Definition at line 34 of file database.c.