Pike v8.0 release 1738

Method Sql.sql_util.handle_extraargs()


Method handle_extraargs

array(string|mapping(string|int:mixed)) handle_extraargs(string query, array(mixed) extraargs, void|mapping(string|int:mixed) bindings)

Description

Handle sprintf-based quoted arguments

Parameter query

The query as sent to one of the query functions.

Parameter extraargs

The arguments following the query.

Parameter bindings

Optional bindings mapping to which additional bindings will be added. It's returned as the second element in the return value. A new mapping is used if this isn't specified.

Returns

Returns an array with two elements:

Array
string 0

The query altered to use bindings-syntax.

mapping(string|int:mixed) 1

A bindings mapping. Zero if no bindings were added.