mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Fix. Improve parameters patterns. (#2218)
E.g. now it handle queries like
```Lua
local sql = "select :J::text as value"
print(dbh:first_value(sql, {J='hello'}))
```
This commit is contained in:
committed by
FusionPBX
parent
598b746074
commit
d390270b2e
@@ -23,7 +23,7 @@ local unpack = unpack or table.unpack
|
||||
|
||||
local NULL, DEFAULT = {}, {}
|
||||
|
||||
local param_pattern = "[:]([^%d%s][%a%d_]+)"
|
||||
local param_pattern = "%f[%a%d:][:]([%a][%a%d_]*)"
|
||||
|
||||
--
|
||||
-- Substitude named parameters to query
|
||||
|
||||
Reference in New Issue
Block a user