diff options
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 31 |
1 files changed, 29 insertions, 2 deletions
@@ -1,9 +1,9 @@ -vmod-dbrw -- history of user-visible changes. 2018-01-30 +vmod-dbrw -- history of user-visible changes. 2018-12-08 See the end of file for copying conditions. Please send vmod-dbrw bug reports to <gray@gnu.org> -Version 2.2.90 (Git) +Version 2.2.91 (Git) * SQL idle timeout @@ -18,6 +18,33 @@ e.g.: {"select dest,pattern,value,flags from rewrite where locate(url,'$url') = 1 order by weight asc;"}); +* The $() functions in SQL templates + +The SQL templates support the use of $() constructs for invoking +built-in functions. So far one function is implemented: + + $(urlprefixes PATH) + +It expands to comma-separated list of properly quoted pathname +prefixes, constructed from its argument. Optional query part is +stripped off the argument prior to expansion. For example + + $(urlprefixes "/local/user/local?a=1") + +expands to: + + '/local/user/local','/local/user','/local' + +This construct is intended for use in SQL IN conditionals, for +example: + + SELECT dest,pattern,value,flags + FROM rewrite + WHERE host='$host' + AND url IN ($(urlprefixes $url)) + ORDER BY length(dest),value,weight DESC + + Version 2.2, 2017-08-10 |