diff options
author | Kim Alvefur <zash@zash.se> | 2015-07-02 22:32:44 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-07-02 22:32:44 +0200 |
commit | c9035dd6cdab062206e57e3df9415cb8e6f0bc0a (patch) | |
tree | bd2ae03829e25ec93e32331db4e13a1f350a8637 /util/sql.lua | |
parent | ca8fb84d803ffed712f1004606131f93b5c6485b (diff) | |
download | prosody-c9035dd6cdab062206e57e3df9415cb8e6f0bc0a.tar.gz prosody-c9035dd6cdab062206e57e3df9415cb8e6f0bc0a.zip |
util.sql: Call onconnect, provide noop dummy if not set
Diffstat (limited to 'util/sql.lua')
-rw-r--r-- | util/sql.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/sql.lua b/util/sql.lua index 5aa12f94..92032f43 100644 --- a/util/sql.lua +++ b/util/sql.lua @@ -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 |