added a driver type getter for database implementations

This commit is contained in:
Martin Willi
2008-07-21 11:13:06 +00:00
parent a4a3e0c7dc
commit fc861b0b7e
3 changed files with 38 additions and 0 deletions
@@ -281,6 +281,14 @@ static int execute(private_sqlite_database_t *this, int *rowid, char *sql, ...)
return affected;
}
/**
* Implementation of database_t.get_driver
*/
static db_driver_t get_driver(private_sqlite_database_t *this)
{
return DB_SQLITE;
}
/**
* Implementation of database_t.destroy
*/
@@ -312,6 +320,7 @@ sqlite_database_t *sqlite_database_create(char *uri)
this->public.db.query = (enumerator_t* (*)(database_t *this, char *sql, ...))query;
this->public.db.execute = (int (*)(database_t *this, int *rowid, char *sql, ...))execute;
this->public.db.get_driver = (db_driver_t(*)(database_t*))get_driver;
this->public.db.destroy = (void(*)(database_t*))destroy;
this->mutex = mutex_create(MUTEX_RECURSIVE);