liquid_feedback_frontend
diff env/encode/pg_hstore_value.lua @ 1071:58f48a8a202a
Imported and merged LDAP patch
author | bsw |
---|---|
date | Fri Jul 18 21:42:59 2014 +0200 (2014-07-18) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/env/encode/pg_hstore_value.lua Fri Jul 18 21:42:59 2014 +0200 1.3 @@ -0,0 +1,6 @@ 1.4 +-- Formats a value (or a key) for usage in the text representation of 1.5 +-- hstore fields 1.6 + 1.7 +function encode.pg_hstore_value(value) 1.8 + return '"' .. string.gsub(value, '([\\"])', "\\%1") .. '"' 1.9 +end 1.10 \ No newline at end of file