FS-9256: mod_v8: Add DB.Finalize() in order to close statements.
This commit is contained in:
parent
b3130028a1
commit
36ffb29298
|
@ -72,6 +72,7 @@ public:
|
||||||
JS_COREDB_FUNCTION_DEF(Prepare);
|
JS_COREDB_FUNCTION_DEF(Prepare);
|
||||||
JS_COREDB_FUNCTION_DEF(BindText);
|
JS_COREDB_FUNCTION_DEF(BindText);
|
||||||
JS_COREDB_FUNCTION_DEF(BindInt);
|
JS_COREDB_FUNCTION_DEF(BindInt);
|
||||||
|
JS_COREDB_FUNCTION_DEF(Finalize);
|
||||||
JS_COREDB_GET_PROPERTY_DEF(GetProperty);
|
JS_COREDB_GET_PROPERTY_DEF(GetProperty);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -232,6 +232,14 @@ JS_COREDB_FUNCTION_IMPL(Step)
|
||||||
StepEx(info, SWITCH_CORE_DB_DONE);
|
StepEx(info, SWITCH_CORE_DB_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JS_COREDB_FUNCTION_IMPL(Finalize)
|
||||||
|
{
|
||||||
|
if (_stmt) {
|
||||||
|
switch_core_db_finalize(_stmt);
|
||||||
|
_stmt = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
JS_COREDB_FUNCTION_IMPL(Fetch)
|
JS_COREDB_FUNCTION_IMPL(Fetch)
|
||||||
{
|
{
|
||||||
HandleScope handle_scope(info.GetIsolate());
|
HandleScope handle_scope(info.GetIsolate());
|
||||||
|
@ -415,6 +423,7 @@ static const js_function_t db_methods[] = {
|
||||||
{"prepare", FSCoreDB::Prepare},
|
{"prepare", FSCoreDB::Prepare},
|
||||||
{"bindText", FSCoreDB::BindText},
|
{"bindText", FSCoreDB::BindText},
|
||||||
{"bindInt", FSCoreDB::BindInt},
|
{"bindInt", FSCoreDB::BindInt},
|
||||||
|
{"finalize", FSCoreDB::Finalize},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue