메소드 |
설명 |
|
_bindInto ( $pattern, $sql, $params, $func ) |
Bind parameters into a particular pattern, skipping quoted strings which might have question marks
in them. |
|
bind ( $sql, array $params = [] ) : string |
Interpolates quoted values in a string with ? in it. |
|
escape ( $string ) : string |
Escapes any characters not allowed in an SQL string |
|
magicBind ( $sql, array $params = [] ) : string |
Like bind(), but adds some magic:
- a=? becomes a IS NULL if passed null
- a!=? or a<>? becomes a IS NOT NULL if passed null
- a=? becomes a IN (1, 2, 3) if passed array(1, 2, 3)
- a!=? or a<>? becomes a NOT IN (1, 2, 3) if passed array(1, 2, 3) |
|
quote ( $string ) : string |
Surrounds a string with quote marks, null is returned as NULL, bools
converted to 1|empty string for compatibility |
|
reduce ( $array ) : string |
Reduces an array of values into a bracketed, quoted, comma delimited list |
|
sqlValue ( $mixed ) : string |
Intelligently quotes/escapes based on the provided type. If an object
is passed with a toSql() method, that is used, otherwise the php type
is used to infer what needs escaping. |
|