mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-25 13:17:22 +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):
|
def _configure(env):
|
||||||
#env.ParseConfig("pkg-config sqlite3 --cflags --libs")
|
#env.ParseConfig("pkg-config sqlite3 --cflags --libs")
|
||||||
|
|
||||||
env.Append(CPPDEFINES=["SQLITE_PRESENT"])
|
#env.Append(CPPDEFINES=[("SQLITE_THREADSAFE", 1)])
|
||||||
|
|
||||||
# Link those statically for portability
|
#env.Append(LINKFLAGS=["-ldl"])
|
||||||
#if env["use_static_cpp"]:
|
pass
|
||||||
#env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])
|
|
||||||
|
|
||||||
env.Append(LINKFLAGS=["-ldl"])
|
|
||||||
|
|
||||||
|
|
||||||
def get_doc_classes():
|
def get_doc_classes():
|
||||||
|
@ -27,15 +27,19 @@ Ref<TableBuilder> SQLite3DatabaseConnection::get_table_builder() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SQLite3DatabaseConnection::database_connect(const String &connection_str) {
|
void SQLite3DatabaseConnection::database_connect(const String &connection_str) {
|
||||||
int ret = sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
|
int ret = sqlite3_config(SQLITE_CONFIG_SERIALIZED);
|
||||||
if (ret != SQLITE_OK) {
|
//if (ret != SQLITE_OK) {
|
||||||
ERR_PRINT("SQLITE3 multithreading is not supported!\n");
|
//ERR_PRINT("SQLITE3 multithreading is not supported!\n");
|
||||||
}
|
//}
|
||||||
|
|
||||||
//CharString cstr = connection_str.ascii();
|
//CharString cstr = connection_str.ascii();
|
||||||
CharString cstr = connection_str.utf8();
|
CharString cstr = connection_str.utf8();
|
||||||
|
|
||||||
ret = sqlite3_open(cstr.get_data(), &conn);
|
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) {
|
Ref<QueryResult> SQLite3DatabaseConnection::query(const String &query) {
|
||||||
|
Loading…
Reference in New Issue
Block a user