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:
Alexey Melnichuk
2017-04-22 19:18:10 +03:00
committed by FusionPBX
parent 598b746074
commit d390270b2e

View File

@@ -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