sqlEncode
text sqlEncode(value)
Returns the value encoded for safe use in an SQL WHERE clause:
- a null value is encoded as an SQL
NULL literal
- a number value is encoded as is, an SQL number literal.
- a text value is encoded as an SQL text literal, escaped appropriately and wrapped in single quotes.
- an array value is encoded as all elements wrapped in parenthesis, for use with the SQL
IN operator.
- a dictionary value is encoded as all keys wrapped in parenthesis, for use with the SQL
IN operator.
Parameters
- value — value to encode.
Returns
- the argument as text, encoded for safe use in an SQL where clause.