From 3dd49f5620ef6860767fee2904399a77e242e10e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 2 Jul 2015 22:32:44 +0200 Subject: util.sql: Call onconnect, provide noop dummy if not set --- util/sql.lua | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3