Convenience class to help composing select, insert and update statements.
Empty strings are handled like NULL in context of inserts and updates. In select conditions the database column is compared to both, NULL or '', if the string value is empty. This special handling is necessary because for Oracle NULL and '' are the same, however for PostgreSQL they are not.
vals.insert('c_y', null);
vals.insert('c_z', '');
q.prepare(
String(
"select c_foo from t_table where %1").arg(vals.condPairs)
);
q.execute(vals.values);
q.prepare(
String(
"update t_table set %1 where c_key=?").arg(vals.pairs)
);
q.execute(vals.values.concat(456));
q.prepare(
String(
"insert into t_table (%1) values (%2)")
.arg(vals.columns)
.arg(vals.tags)
);
q.execute(vals.values);
BPS Script engine enhancements to the String prototype.
Definition: Engine.js:44
Convenience class to help composing select, insert and update statements.
Definition: bps.SqlValues.js:42
void insert(String aKey, Mixed aValue)
Insert a key/value pair.
The bps extension is a namespace assembling general BPS properties and functions.
Definition: bps.AsyncIO.js:1