1
0
Fork 0
mirror of https://github.com/bjc/prosody.git synced 2025-04-06 14:47:37 +03:00

util.sql: Call onconnect, provide noop dummy if not set

This commit is contained in:
Kim Alvefur 2015-07-02 22:32:44 +02:00
parent 723c6ffe7e
commit 3dd49f5620

View file

@ -111,8 +111,12 @@ function engine:connect()
self.conn = dbh;
self.prepared = {};
self:set_encoding();
self:onconnect();
return true;
end
function engine:onconnect()
-- Override from create_engine()
end
function engine:execute(sql, ...)
local success, err = self:connect();
if not success then return success, err; end