webmcp
diff doc/autodoc-header.htmlpart @ 295:1fbdccf4f8e9
Always enable SQL tracer (within framework/env/__init.lua); Record execution time of SQL statements
author | jbe |
---|---|
date | Sun Mar 22 18:40:07 2015 +0100 (2015-03-22) |
parents | e5c9319b28f9 |
children | 785ff282af16 |
line diff
1.1 --- a/doc/autodoc-header.htmlpart Sun Mar 22 17:33:37 2015 +0100 1.2 +++ b/doc/autodoc-header.htmlpart Sun Mar 22 18:40:07 2015 +0100 1.3 @@ -153,18 +153,9 @@ 1.4 </p> 1.5 <pre> 1.6 _G.db = assert(mondelefant.connect(config.db)) 1.7 -function mondelefant.class_prototype:get_db_conn() return db end 1.8 - 1.9 -if config.db_trace then 1.10 - function db:sql_tracer(command) 1.11 - return function(error_info) 1.12 - local error_info = error_info or {} 1.13 - trace.sql{ command = command, error_position = error_info.position } 1.14 - end 1.15 - end 1.16 -end</pre> 1.17 +function mondelefant.class_prototype:get_db_conn() return db end</pre> 1.18 <p> 1.19 - Overwriting the <tt>sql_tracer</tt> method of the database handle is optional, but helpful for debugging. The parameters for <tt>mondelefant.connect</tt> are directly passed to PostgreSQL's client library libpq. See <a href="http://www.postgresql.org/docs/9.4/static/libpq-connect.html">PostgreSQL's documentation on PQconnect</a> for information about supported parameters. 1.20 + The parameters for <tt>mondelefant.connect</tt> are directly passed to PostgreSQL's client library libpq. See <a href="http://www.postgresql.org/docs/9.4/static/libpq-connect.html">PostgreSQL's documentation on PQconnect</a> for information about supported parameters. 1.21 </p> 1.22 <p> 1.23 To define a model to be used within a WebMCP application, create a file named with the name of the model and <tt>.lua</tt> as extension in the <tt>model/</tt> directory of your application. The most basic definition of a model (named “movie” in this example) is: