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 | 3dd49f5620ef6860767fee2904399a77e242e10e (patch) | |
tree | bd2ae03829e25ec93e32331db4e13a1f350a8637 /util/sql.lua | |
parent | 723c6ffe7e5ceb9e9236d9c54d0d4eba1162370d (diff) | |
download | prosody-3dd49f5620ef6860767fee2904399a77e242e10e.tar.gz prosody-3dd49f5620ef6860767fee2904399a77e242e10e.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 |