Method __builtin.Sql.Connection()->emulate_bindings()
- Method
emulate_bindings
protected
string
emulate_bindings(string
query
,mapping
(string
|int
:mixed
)bindings
,__deprecated__
(string
)|void
charset
)- Description
Build a raw SQL query, given the cooked query and the variable bindings It's meant to be used as an emulation engine for those drivers that do not provide such behaviour directly (like eg Oracle). The raw query can contain some variables (identified by prefixing a colon to a name or a number (eg
":var"
or":2"
)). They will be replaced by the corresponding value in the mapping.- Parameter
query
The query.
- Parameter
bindings
Mapping containing the variable bindings. Make sure that no confusion is possible in the query. If necessary, change the variables' names.
- Parameter
charset
Query charset. Compatibility with Pike 8.0 Mysql API. Use the QUERY_OPTION_CHARSET entry in
bindings
instead.