mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-24 12:47:12 +01:00
Set sqlite to serialized mode.
This commit is contained in:
parent
a19be9b170
commit
6fdcd0e7c0
@ -37,13 +37,10 @@ def configure(env):
|
||||
def _configure(env):
|
||||
#env.ParseConfig("pkg-config sqlite3 --cflags --libs")
|
||||
|
||||
env.Append(CPPDEFINES=["SQLITE_PRESENT"])
|
||||
#env.Append(CPPDEFINES=[("SQLITE_THREADSAFE", 1)])
|
||||
|
||||
# Link those statically for portability
|
||||
#if env["use_static_cpp"]:
|
||||
#env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])
|
||||
|
||||
env.Append(LINKFLAGS=["-ldl"])
|
||||
#env.Append(LINKFLAGS=["-ldl"])
|
||||
pass
|
||||
|
||||
|
||||
def get_doc_classes():
|
||||
|
@ -27,15 +27,19 @@ Ref<TableBuilder> SQLite3DatabaseConnection::get_table_builder() {
|
||||
}
|
||||
|
||||
void SQLite3DatabaseConnection::database_connect(const String &connection_str) {
|
||||
int ret = sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
|
||||
if (ret != SQLITE_OK) {
|
||||
ERR_PRINT("SQLITE3 multithreading is not supported!\n");
|
||||
}
|
||||
int ret = sqlite3_config(SQLITE_CONFIG_SERIALIZED);
|
||||
//if (ret != SQLITE_OK) {
|
||||
//ERR_PRINT("SQLITE3 multithreading is not supported!\n");
|
||||
//}
|
||||
|
||||
//CharString cstr = connection_str.ascii();
|
||||
CharString cstr = connection_str.utf8();
|
||||
|
||||
ret = sqlite3_open(cstr.get_data(), &conn);
|
||||
|
||||
if (ret != SQLITE_OK) {
|
||||
ERR_PRINT(vformat("SQLITE3 database_connect failed! code: %d !", ret));
|
||||
}
|
||||
}
|
||||
|
||||
Ref<QueryResult> SQLite3DatabaseConnection::query(const String &query) {
|
||||
|
Loading…
Reference in New Issue
Block a user