Software /
code /
prosody
Diff
util/sql.lua @ 6748:ccf4fcfc2024
util.sql: Call onconnect, provide noop dummy if not set
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 02 Jul 2015 22:32:44 +0200 |
parent | 6735:b553a30620b2 |
child | 6758:88b89facc3c9 |
line wrap: on
line diff
--- a/util/sql.lua Sat Jun 27 16:45:31 2015 +0200 +++ b/util/sql.lua Thu Jul 02 22:32:44 2015 +0200 @@ -111,8 +111,12 @@ 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