Lightweight 0.20260303.0
Loading...
Searching...
No Matches
Lightweight::SqlUpdateDataPlan Struct Reference

Represents a SQL UPDATE data plan for migrations. More...

#include <MigrationPlan.hpp>

Public Attributes

std::string schemaName
 The schema name of the table to update.
 
std::string tableName
 The name of the table to update.
 
std::vector< std::pair< std::string, SqlVariant > > setColumns
 The columns and their values to set.
 
std::vector< std::pair< std::string, std::string > > setExpressions
 Column-to-expression assignments that cannot be represented as a literal value.
 
std::string whereColumn
 The column name for the WHERE clause.
 
std::string whereOp
 The comparison operator for the WHERE clause (e.g., "=", "<>", etc.).
 
SqlVariant whereValue
 The value for the WHERE clause.
 
std::string whereExpression
 Pre-rendered WHERE-clause body (the text after WHERE), used when the condition cannot be expressed with the simple (whereColumn op whereValue) triple — e.g. composite AND/OR/NOT, IS NULL, IN (subquery), or EXISTS (subquery). When non-empty, this takes precedence over the structured triple at SQL-emission time.
 

Detailed Description

Represents a SQL UPDATE data plan for migrations.

This structure represents an UPDATE statement for a migration plan.

Definition at line 441 of file MigrationPlan.hpp.

Member Data Documentation

◆ schemaName

std::string Lightweight::SqlUpdateDataPlan::schemaName

The schema name of the table to update.

Definition at line 444 of file MigrationPlan.hpp.

◆ tableName

std::string Lightweight::SqlUpdateDataPlan::tableName

The name of the table to update.

Definition at line 447 of file MigrationPlan.hpp.

◆ setColumns

std::vector<std::pair<std::string, SqlVariant> > Lightweight::SqlUpdateDataPlan::setColumns

The columns and their values to set.

Definition at line 450 of file MigrationPlan.hpp.

◆ setExpressions

std::vector<std::pair<std::string, std::string> > Lightweight::SqlUpdateDataPlan::setExpressions

Column-to-expression assignments that cannot be represented as a literal value.

Each entry is (column name, raw SQL expression). The expression is emitted verbatim after "col" = at SQL-rendering time — used for things like set TARGET = SOURCE or set CTR = CTR + 1 where the RHS references another column or contains arithmetic. Entries here are appended to the SET clause after setColumns.

Definition at line 458 of file MigrationPlan.hpp.

◆ whereColumn

std::string Lightweight::SqlUpdateDataPlan::whereColumn

The column name for the WHERE clause.

Definition at line 461 of file MigrationPlan.hpp.

◆ whereOp

std::string Lightweight::SqlUpdateDataPlan::whereOp

The comparison operator for the WHERE clause (e.g., "=", "<>", etc.).

Definition at line 464 of file MigrationPlan.hpp.

◆ whereValue

SqlVariant Lightweight::SqlUpdateDataPlan::whereValue

The value for the WHERE clause.

Definition at line 467 of file MigrationPlan.hpp.

◆ whereExpression

std::string Lightweight::SqlUpdateDataPlan::whereExpression

Pre-rendered WHERE-clause body (the text after WHERE), used when the condition cannot be expressed with the simple (whereColumn op whereValue) triple — e.g. composite AND/OR/NOT, IS NULL, IN (subquery), or EXISTS (subquery). When non-empty, this takes precedence over the structured triple at SQL-emission time.

Definition at line 474 of file MigrationPlan.hpp.


The documentation for this struct was generated from the following file: