From c9035dd6cdab062206e57e3df9415cb8e6f0bc0a 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(+) (limited to 'util/sql.lua') 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