aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sql.lib.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-04-18 11:13:40 +0100
committerMatthew Wild <mwild1@gmail.com>2013-04-18 11:13:40 +0100
commit7d92759bf8162dab463e4624a26642c1015a44d8 (patch)
treea3a9a8ff5de3a20a633b079bd5e5e81eaaad39af /plugins/sql.lib.lua
parent1da2e8a43efbe7dc97b43446972e3c0e50daa37b (diff)
downloadprosody-7d92759bf8162dab463e4624a26642c1015a44d8.tar.gz
prosody-7d92759bf8162dab463e4624a26642c1015a44d8.zip
mod_storage_sql2 (temporary name), sql.lib, util.sql: New SQL API supporting cross-module connection sharing, transactions and Things - a work in progress
Diffstat (limited to 'plugins/sql.lib.lua')
-rw-r--r--plugins/sql.lib.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/sql.lib.lua b/plugins/sql.lib.lua
new file mode 100644
index 00000000..005ee45d
--- /dev/null
+++ b/plugins/sql.lib.lua
@@ -0,0 +1,9 @@
+local cache = module:shared("/*/sql.lib/util.sql");
+
+if not cache._M then
+ prosody.unlock_globals();
+ cache._M = require "util.sql";
+ prosody.lock_globals();
+end
+
+return cache._M;