liquid_feedback_frontend

annotate app/main/_postfork/10_database.lua @ 1145:904f6807f7fa

Added support for upcoming moonbridge bases WebMCP
author bsw
date Sat Mar 21 15:26:39 2015 +0100 (2015-03-21)
parents
children 911253ad0898
rev   line source
bsw@1145 1 -- open and set default database handle
bsw@1145 2 _G.db = assert(mondelefant.connect(config.database))
bsw@1145 3
bsw@1145 4 function mondelefant.class_prototype:get_db_conn() return db end
bsw@1145 5
bsw@1145 6 -- enable output of SQL commands in trace system
bsw@1145 7 function db:sql_tracer(command)
bsw@1145 8 return function(error_info)
bsw@1145 9 local error_info = error_info or {}
bsw@1145 10 trace.sql{ command = command, error_position = error_info.position }
bsw@1145 11 end
bsw@1145 12 end
bsw@1145 13
bsw@1145 14 execute.inner()
bsw@1145 15
bsw@1145 16 -- close the database
bsw@1145 17 db:close()

Impressum / About Us