Skip to content

Commit 9b46abe

Browse files
committed
update(scripting/database): Default Connection
1 parent ea8384d commit 9b46abe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugins/lua/scripting/database.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "core.h"
22

3-
void SetupLuaDatabase(LuaPlugin *plugin, lua_State *state)
3+
void SetupLuaDatabase(LuaPlugin* plugin, lua_State* state)
44
{
55
luabridge::getGlobalNamespace(state)
66
.beginClass<PluginDatabase>("Database")
@@ -11,5 +11,5 @@ void SetupLuaDatabase(LuaPlugin *plugin, lua_State *state)
1111
.addFunction("QueryParams", &PluginDatabase::QueryParamsLua)
1212
.endClass();
1313

14-
luabridge::setGlobal(state, luabridge::LuaRef(state), "db");
14+
luaL_dostring(state, "db = Database(\"default_connection\")");
1515
}

0 commit comments

Comments
 (0)