<p>
<code>mod_lua</code> provides a handler named <code>lua-script</code>,
-which can be used with an <code>AddHandler</code> directive:</p>
+which can be used with an <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code>
+or <code class="directive"><a href="../mod/core.html#sethandler">SetHandler</a></code> directive:</p>
-<pre class="prettyprint lang-config">AddHandler lua-script .lua</pre>
+<pre class="prettyprint lang-config"><Files *.lua>
+ SetHandler lua-script .lua
+</Files></pre>
<p>
local rows = result(0) -- Fetch ALL rows synchronously
local row = result(-1) -- Fetch the next available row, asynchronously
-local row = result(1234) -- Fetch row number 1234, asynchronously</pre>
+local row = result(1234) -- Fetch row number 1234, asynchronously
+local row = result(-1, true) -- Fetch the next available row, using row names as key indexes.</pre>
<p>One can construct a function that returns an iterative function to iterate over all rows
in a synchronous or asynchronous way, depending on the async argument:
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
-<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.5.0 and later</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.5 and later</td></tr>
</table>
<p>Provides a means of adding a Lua function as an input filter.
As with output filters, input filters work as coroutines,
</p>
<pre class="prettyprint lang-config">LuaInputFilter myInputFilter /www/filter.lua input_filter
-<FilesMatch "\.lua>
+<Files *.lua>
SetInputFilter myInputFilter
-</FilesMatch></pre>
+</Files></pre>
<pre class="prettyprint lang-lua">--[[
Example input filter that converts all POST data to uppercase.
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
-<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.5.0 and later</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.5 and later</td></tr>
</table>
<p>Provides a means of adding a Lua function as an output filter.
As with input filters, output filters work as coroutines,
</p>
<pre class="prettyprint lang-config">LuaOutputFilter myOutputFilter /www/filter.lua output_filter
-<FilesMatch "\.lua>
+<Files *.lua>
SetOutputFilter myOutputFilter
-</FilesMatch></pre>
+</Files></pre>
<pre class="prettyprint lang-lua">--[[
Example output filter that escapes all HTML entities in the output