webmcp

view framework/env/trace/sql.lua @ 196:ce8fd7767b38

Fix in inline documentation of atom.integer.invalid
author jbe
date Mon Aug 11 21:29:46 2014 +0200 (2014-08-11)
parents 0bbfee4d4aed
children 1fbdccf4f8e9
line source
1 --[[--
2 trace.sql{
3 command = command, -- executed SQL command as string
4 error_position = error_position -- optional position in bytes where an error occurred
5 }
7 This command can be used to log SQL command execution. It is currently not invoked automatically.
9 --]]--
11 -- TODO: automatic use of this function?
13 function trace.sql(args)
14 if not trace._disabled then
15 local command = args.command
16 local error_position = args.error_position
17 if type(command) ~= "string" then
18 error("No command string passed to trace.sql{...}.")
19 end
20 if error_position and type(error_position) ~= "number" then
21 error("error_position must be a number.")
22 end
23 trace._new_entry{
24 type = "sql",
25 command = command,
26 error_position = error_position
27 }
28 end
29 end

Impressum / About Us