Diff

plugins/sql.lib.lua @ 5494:9916f0a2d178

mod_storage_sql2 (temporary name), sql.lib, util.sql: New SQL API supporting cross-module connection sharing, transactions and Things - a work in progress
author Matthew Wild <mwild1@gmail.com>
date Thu, 18 Apr 2013 11:13:40 +0100
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/sql.lib.lua	Thu Apr 18 11:13:40 2013 +0100
@@ -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;