The singleton SchemaManager class used to interact with the extension schemas created by various extension services.
More...
#include <schema.h>
|
void | load (sqlite3 *db) |
| Load the existing Schema from the table of supported schemas. More...
|
|
bool | create (sqlite3 *db, const std::string &definition) |
| Create a schema. More...
|
|
bool | exists (sqlite3 *db, const std::string &schema) |
| Check if a named schema exists, loading the schemas if need be. More...
|
|
The singleton SchemaManager class used to interact with the extension schemas created by various extension services.
◆ create()
bool SchemaManager::create |
( |
sqlite3 * |
db, |
|
|
const std::string & |
definition |
|
) |
| |
Create a schema.
This may create a completely new schema if it does not already exist, update an existing schema if the version is different from the one that already exists or no nothing if the schema exists and the version of the schema is the same.
- Parameters
-
db | A database connection to use for sqlite3 interactions |
definition | The schema definition |
- Returns
- bool Returns true if the schema was created, updated or no action is required
◆ exists()
bool SchemaManager::exists |
( |
sqlite3 * |
db, |
|
|
const std::string & |
schema |
|
) |
| |
Check if a named schema exists, loading the schemas if need be.
As a side effect the schema will be attached to the database connection.
- Parameters
-
schema | The schema to check the existance of |
- Returns
- bool True if the schema exists
◆ getInstance()
◆ load()
void SchemaManager::load |
( |
sqlite3 * |
db | ) |
|
Load the existing Schema from the table of supported schemas.
- Parameters
-
db | The database connection to use to load the schema information |
The documentation for this class was generated from the following files:
- C/plugins/storage/sqlite/schema/include/schema.h
- C/plugins/storage/sqlite/schema/schema.cpp