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:
parent
723c6ffe7e
commit
3dd49f5620
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue