Constructor of OINODbSqlStatement.
database whose placeholder syntax and bind-value coercion to use
whether values are collected as bind parameters (true) or inlined as escaped literals (false, legacy)
Assembled SQL text (with bind placeholders in parameterized mode, inline literals in legacy mode)
ReadonlyvaluesOrdered bind values corresponding to the placeholders in sql (empty in legacy mode)
Whether this statement collects bind parameters (true) or inlines literals (false).
Append a field value to the statement and return the SQL fragment to embed in its place.
In parameterized mode the value is coerced via field.bindCellValue, pushed onto values,
and a bind placeholder token is returned. In legacy mode an escaped inline literal is returned
and values is left untouched.
field the value belongs to (provides native type / coercion / escaping)
cell value to add
A SQL statement being assembled together with the ordered bind values its placeholders refer to.
This is both the builder used while a statement is being constructed and the finished statement that gets executed:
addFieldValueis called during assembly to append a value and get back the placeholder token to embed insql, and once assembly is donesql+valuesare handed toOINODb.runStatement.A statement can be built in one of two modes:
valuesandaddFieldValuereturns a database-specific bind placeholder ($1,?,@p0, …). This is the safe path used by thebuild*Statementmethods andrunStatement.valuesstays empty andaddFieldValuereturns an escaped inline SQL literal. Used only by the deprecatedprintSql*string methods that are kept for backwards compatibility.Values are added in the same left-to-right order the placeholders appear in the final SQL so that positional binding (Postgres
$n, MySQL/SQLite?) stays aligned.