|
Lightweight 0.20260303.0
|
Query builder for building UPDATE queries in migrations. More...
#include <Migrate.hpp>
Public Member Functions | |
| SqlMigrationUpdateBuilder (SqlUpdateDataPlan &plan) | |
| Constructs a migration UPDATE builder. | |
| template<typename T > | |
| SqlMigrationUpdateBuilder & | Set (std::string columnName, T const &value) |
| Sets a column value for the UPDATE. | |
| SqlMigrationUpdateBuilder & | SetExpression (std::string columnName, std::string expression) |
| Sets a column to a raw SQL expression — for column-to-column copies or arithmetic that cannot be represented as a literal value. | |
| template<typename T > | |
| SqlMigrationUpdateBuilder & | Where (std::string columnName, std::string op, T const &value) |
| Adds a WHERE condition to the UPDATE. | |
| SqlMigrationUpdateBuilder & | WhereExpression (std::string expression) |
Supplies a pre-rendered WHERE-clause body for cases that don't fit the simple (column, op, value) form — composite AND/OR/NOT, IS NULL, IN (subquery), EXISTS (subquery), etc. | |
Query builder for building UPDATE queries in migrations.
Definition at line 375 of file Migrate.hpp.
|
inlineexplicit |
Constructs a migration UPDATE builder.
Definition at line 379 of file Migrate.hpp.
|
inline |
Sets a column value for the UPDATE.
Definition at line 386 of file Migrate.hpp.
|
inline |
Sets a column to a raw SQL expression — for column-to-column copies or arithmetic that cannot be represented as a literal value.
| columnName | The target column. |
| expression | The raw SQL fragment (e.g. "OTHER_COL", "CTR" + 1) emitted verbatim after the =. The caller is responsible for any identifier quoting. |
Definition at line 399 of file Migrate.hpp.
|
inline |
Adds a WHERE condition to the UPDATE.
Definition at line 407 of file Migrate.hpp.
|
inline |
Supplies a pre-rendered WHERE-clause body for cases that don't fit the simple (column, op, value) form — composite AND/OR/NOT, IS NULL, IN (subquery), EXISTS (subquery), etc.
The text is emitted verbatim after WHERE at execution time; the caller is responsible for dialect-safe quoting.
| expression | Pre-rendered SQL clause body (without the leading WHERE). |
Definition at line 422 of file Migrate.hpp.