# HG changeset patch # User Kim Alvefur # Date 1435869164 -7200 # Node ID ccf4fcfc202415d4437bd77de2387425efca6952 # Parent 14c52ca661b666d5f990de7500a6b2926affc530 util.sql: Call onconnect, provide noop dummy if not set diff -r 14c52ca661b6 -r ccf4fcfc2024 util/sql.lua --- 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