docs: documented the ngx.quote_sql_str API. also updated the docs for body_filter_by_lua* regarding the "eof" argument in subrequests.

This commit is contained in:
agentzh (Yichun Zhang) 2013-01-23 17:39:51 -08:00
Родитель 2875695b7b
Коммит c8c5688397
3 изменённых файлов: 30 добавлений и 6 удалений

17
README
Просмотреть файл

@ -871,10 +871,10 @@ Directives
and the "eof" flag indicating the end of the response body data stream
is passed via ngx.arg[2] (as a Lua boolean value).
Behind the scene, the "eof" flag is just the "last_buf" flag of the
nginx chain link buffers. And in the context of an Nginx subrequest,
there is no "eof" flag at all, due to the underlying limitation in the
Nginx core.
Behind the scene, the "eof" flag is just the "last_buf" (for main
requests) or "last_in_chain" (for subrequests) flag of the Nginx chain
link buffers. (Before the "v0.7.14" release, the "eof" flag does not
work at all in subrequests.)
The output data stream can be aborted immediately by running the
following Lua statement:
@ -3379,6 +3379,15 @@ Nginx API for Lua
This function was first introduced in the "v0.5.0rc6".
ngx.quote_sql_str
syntax: *quoted_value = ngx.quote_sql_str(raw_value)*
context: *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*,
header_filter_by_lua*, body_filter_by_lua*, log_by_lua**
Returns a quoted SQL string literal according to the MySQL quoting
rules.
ngx.today
syntax: *str = ngx.today()*

Просмотреть файл

@ -771,7 +771,7 @@ Uses Lua code specified in `<lua-script-str>` to define an output body filter.
The input data chunk is passed via [ngx.arg](http://wiki.nginx.org/HttpLuaModule#ngx.arg)[1] (as a Lua string value) and the "eof" flag indicating the end of the response body data stream is passed via [ngx.arg](http://wiki.nginx.org/HttpLuaModule#ngx.arg)[2] (as a Lua boolean value).
Behind the scene, the "eof" flag is just the `last_buf` flag of the nginx chain link buffers. And in the context of an Nginx subrequest, there is no "eof" flag at all, due to the underlying limitation in the Nginx core.
Behind the scene, the "eof" flag is just the `last_buf` (for main requests) or `last_in_chain` (for subrequests) flag of the Nginx chain link buffers. (Before the `v0.7.14` release, the "eof" flag does not work at all in subrequests.)
The output data stream can be aborted immediately by running the following Lua statement:
@ -3113,6 +3113,14 @@ This function requires SHA-1 support in the Nginx build. (This usually just mean
This function was first introduced in the `v0.5.0rc6`.
ngx.quote_sql_str
-----------------
**syntax:** *quoted_value = ngx.quote_sql_str(raw_value)*
**context:** *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, log_by_lua**
Returns a quoted SQL string literal according to the MySQL quoting rules.
ngx.today
---------
**syntax:** *str = ngx.today()*

Просмотреть файл

@ -743,7 +743,7 @@ Uses Lua code specified in <code><lua-script-str></code> to define an output bod
The input data chunk is passed via [[#ngx.arg|ngx.arg]][1] (as a Lua string value) and the "eof" flag indicating the end of the response body data stream is passed via [[#ngx.arg|ngx.arg]][2] (as a Lua boolean value).
Behind the scene, the "eof" flag is just the <code>last_buf</code> flag of the nginx chain link buffers. And in the context of an Nginx subrequest, there is no "eof" flag at all, due to the underlying limitation in the Nginx core.
Behind the scene, the "eof" flag is just the <code>last_buf</code> (for main requests) or <code>last_in_chain</code> (for subrequests) flag of the Nginx chain link buffers. (Before the <code>v0.7.14</code> release, the "eof" flag does not work at all in subrequests.)
The output data stream can be aborted immediately by running the following Lua statement:
@ -3011,6 +3011,13 @@ This function requires SHA-1 support in the Nginx build. (This usually just mean
This function was first introduced in the <code>v0.5.0rc6</code>.
== ngx.quote_sql_str ==
'''syntax:''' ''quoted_value = ngx.quote_sql_str(raw_value)''
'''context:''' ''set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, log_by_lua*''
Returns a quoted SQL string literal according to the MySQL quoting rules.
== ngx.today ==
'''syntax:''' ''str = ngx.today()''