Lightweight 0.20260303.0
Loading...
Searching...
No Matches
Lightweight::SqlDeleteQueryBuilder Class Referencefinal

Query builder for building DELETE FROM ... queries. More...

#include <Delete.hpp>

Inheritance diagram for Lightweight::SqlDeleteQueryBuilder:
Lightweight::SqlWhereClauseBuilder< SqlDeleteQueryBuilder >

Public Member Functions

 SqlDeleteQueryBuilder (SqlQueryFormatter const &formatter, std::string table, std::string tableAlias) noexcept
 Constructs a DELETE query builder.
 
SqlSearchCondition & SearchCondition () noexcept
 Returns the search condition for the query.
 
SqlQueryFormatter const & Formatter () const noexcept
 Returns the SQL query formatter.
 
std::string ToSql () const
 Finalizes building the query as DELETE FROM ... query.
 
- Public Member Functions inherited from Lightweight::SqlWhereClauseBuilder< SqlDeleteQueryBuilder >
SqlDeleteQueryBuilderAnd () noexcept
 Indicates, that the next WHERE clause should be AND-ed (default).
 
SqlDeleteQueryBuilderOr () noexcept
 Indicates, that the next WHERE clause should be OR-ed.
 
SqlDeleteQueryBuilderNot () noexcept
 Indicates, that the next WHERE clause should be negated.
 
SqlDeleteQueryBuilderWhereRaw (std::string_view sqlConditionExpression)
 Constructs or extends a raw WHERE clause.
 
SqlDeleteQueryBuilderWhere (ColumnName const &columnName, std::string_view binaryOp, T const &value)
 Constructs or extends a WHERE clause to test for a binary operation.
 
SqlDeleteQueryBuilderWhere (ColumnName const &columnName, std::string_view binaryOp, SubSelectQuery const &value)
 Constructs or extends a WHERE clause to test for a binary operation for RHS as sub-select query.
 
SqlDeleteQueryBuilderWhere (ColumnName const &columnName, std::string_view binaryOp, char const(&value)[N])
 Constructs or extends a WHERE clause to test for a binary operation for RHS as string literal.
 
SqlDeleteQueryBuilderWhere (ColumnName const &columnName, T const &value)
 Constructs or extends a WHERE clause to test for equality.
 
SqlDeleteQueryBuilderWhere (Callable const &callable)
 Constructs or extends a WHERE/AND clause to test for a group of values.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhere (ColumnName const &columnName, T const &value)
 Constructs or extends a WHERE clause to test for equality.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhere (Callable const &callable)
 Constructs or extends a WHERE/AND clause to test for a group of values.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhere (ColumnName const &columnName, std::string_view binaryOp, char const(&value)[N])
 Constructs or extends a WHERE clause with a string literal value.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhere (ColumnName const &columnName, std::string_view binaryOp, T const &value)
 Constructs or extends a WHERE clause to test for a binary operation.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhere (ColumnName const &columnName, std::string_view binaryOp, SubSelectQuery const &value)
 Constructs or extends a WHERE clause with a sub-select query.
 
SqlDeleteQueryBuilderOrWhere (ColumnName const &columnName, std::string_view binaryOp, T const &value)
 Constructs or extends a WHERE/OR clause to test for a binary operation.
 
SqlDeleteQueryBuilderOrWhere (ColumnName const &columnName, T const &value)
 Constructs or extends an WHERE/OR clause to test for equality.
 
SqlDeleteQueryBuilderOrWhere (Callable const &callable)
 Constructs or extends an WHERE/OR clause to test for a group of values.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderOrWhere (ColumnName const &columnName, T const &value)
 Constructs or extends a WHERE/OR clause to test for equality.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderOrWhere (Callable const &callable)
 Constructs or extends a WHERE/OR clause to test for a group of values.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderOrWhere (ColumnName const &columnName, std::string_view binaryOp, T const &value)
 Constructs or extends a WHERE/OR clause with a binary operation.
 
SqlDeleteQueryBuilderWhereIn (ColumnName const &columnName, InputRange const &values)
 Constructs or extends an WHERE/OR clause to test for a value, satisfying std::ranges::input_range.
 
SqlDeleteQueryBuilderWhereIn (ColumnName const &columnName, std::initializer_list< T > const &values)
 Constructs or extends an WHERE/OR clause to test for a value, satisfying std::initializer_list.
 
SqlDeleteQueryBuilderWhereIn (ColumnName const &columnName, SubSelectQuery const &subSelectQuery)
 Constructs or extends an WHERE/OR clause to test for a value, satisfying a sub-select query.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhereIn (ColumnName const &columnName, InputRange const &values)
 Constructs or extends a WHERE IN clause with an input range.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhereIn (ColumnName const &columnName, std::initializer_list< T > const &values)
 Constructs or extends a WHERE IN clause with an initializer list.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhereIn (ColumnName const &columnName, SubSelectQuery const &subSelectQuery)
 Constructs or extends a WHERE IN clause with a sub-select query.
 
SqlDeleteQueryBuilderWhereNull (ColumnName const &columnName)
 Constructs or extends an WHERE/OR clause to test for a value to be NULL.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhereNull (ColumnName const &columnName)
 Constructs or extends a WHERE clause to test for a value being null.
 
SqlDeleteQueryBuilderWhereNotNull (ColumnName const &columnName)
 Constructs or extends a WHERE clause to test for a value being not null.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhereNotNull (ColumnName const &columnName)
 Constructs or extends a WHERE clause to test for a value being not null.
 
SqlDeleteQueryBuilderWhereNotEqual (ColumnName const &columnName, T const &value)
 Constructs or extends a WHERE clause to test for a value being equal to another column.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhereNotEqual (ColumnName const &columnName, T const &value)
 Constructs or extends a WHERE clause to test for inequality.
 
SqlDeleteQueryBuilderWhereTrue (ColumnName const &columnName)
 Constructs or extends a WHERE clause to test for a value being true.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhereTrue (ColumnName const &columnName)
 Constructs or extends a WHERE clause to test for a value being true.
 
SqlDeleteQueryBuilderWhereFalse (ColumnName const &columnName)
 Constructs or extends a WHERE clause to test for a value being false.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhereFalse (ColumnName const &columnName)
 Constructs or extends a WHERE clause to test for a value being false.
 
SqlDeleteQueryBuilderWhereColumn (LeftColumn const &left, std::string_view binaryOp, RightColumn const &right)
 Construts or extends a WHERE clause to test for a binary operation between two columns.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderWhereColumn (LeftColumn const &left, std::string_view binaryOp, RightColumn const &right)
 Constructs or extends a WHERE clause to compare two columns.
 
SqlDeleteQueryBuilderInnerJoin (TableName auto joinTable, std::string_view joinColumnName, SqlQualifiedTableColumnName onOtherColumn)
 
SqlDeleteQueryBuilderInnerJoin (TableName auto joinTable, std::string_view joinColumnName, std::string_view onMainTableColumn)
 Constructs an INNER JOIN clause.
 
SqlDeleteQueryBuilderInnerJoin (TableName auto joinTable, OnChainCallable const &onClauseBuilder)
 Constructs an INNER JOIN clause with a custom ON clause.
 
SqlDeleteQueryBuilderInnerJoin ()
 
SqlDeleteQueryBuilderLeftOuterJoin (TableName auto joinTable, std::string_view joinColumnName, SqlQualifiedTableColumnName onOtherColumn)
 Constructs an LEFT OUTER JOIN clause.
 
SqlDeleteQueryBuilderLeftOuterJoin (TableName auto joinTable, std::string_view joinColumnName, std::string_view onMainTableColumn)
 Constructs an LEFT OUTER JOIN clause.
 
SqlDeleteQueryBuilderLeftOuterJoin (TableName auto joinTable, OnChainCallable const &onClauseBuilder)
 Constructs an LEFT OUTER JOIN clause with a custom ON clause.
 
SqlDeleteQueryBuilderRightOuterJoin (TableName auto joinTable, std::string_view joinColumnName, SqlQualifiedTableColumnName onOtherColumn)
 Constructs an RIGHT OUTER JOIN clause.
 
SqlDeleteQueryBuilderRightOuterJoin (TableName auto joinTable, std::string_view joinColumnName, std::string_view onMainTableColumn)
 Constructs an RIGHT OUTER JOIN clause.
 
SqlDeleteQueryBuilderRightOuterJoin (TableName auto joinTable, OnChainCallable const &onClauseBuilder)
 Constructs an RIGHT OUTER JOIN clause with a custom ON clause.
 
SqlDeleteQueryBuilderFullOuterJoin (TableName auto joinTable, std::string_view joinColumnName, SqlQualifiedTableColumnName onOtherColumn)
 Constructs an FULL OUTER JOIN clause.
 
SqlDeleteQueryBuilderFullOuterJoin (TableName auto joinTable, std::string_view joinColumnName, std::string_view onMainTableColumn)
 Constructs an FULL OUTER JOIN clause.
 
SqlDeleteQueryBuilderFullOuterJoin (TableName auto joinTable, OnChainCallable const &onClauseBuilder)
 Constructs an FULL OUTER JOIN clause with a custom ON clause.
 
LIGHTWEIGHT_FORCE_INLINE void AppendColumnName (ColumnName const &columnName)
 Appends a column name to the WHERE condition.
 
LIGHTWEIGHT_FORCE_INLINE void AppendLiteralValue (LiteralType const &value)
 Appends a literal value to the WHERE condition.
 
LIGHTWEIGHT_FORCE_INLINE void PopulateLiteralValueInto (LiteralType const &value, TargetType &target)
 Populates a literal value into the target string.
 
LIGHTWEIGHT_FORCE_INLINE SqlDeleteQueryBuilderJoin (JoinType joinType, TableName auto joinTable, Callable const &onClauseBuilder)
 Constructs a JOIN clause with a custom ON clause builder.
 

Detailed Description

Query builder for building DELETE FROM ... queries.

Definition at line 15 of file Delete.hpp.

Constructor & Destructor Documentation

◆ SqlDeleteQueryBuilder()

Lightweight::SqlDeleteQueryBuilder::SqlDeleteQueryBuilder ( SqlQueryFormatter const &  formatter,
std::string  table,
std::string  tableAlias 
)
inlineexplicitnoexcept

Constructs a DELETE query builder.

Definition at line 19 of file Delete.hpp.

Member Function Documentation

◆ SearchCondition()

SqlSearchCondition & Lightweight::SqlDeleteQueryBuilder::SearchCondition ( )
inlinenoexcept

Returns the search condition for the query.

Definition at line 28 of file Delete.hpp.

◆ Formatter()

SqlQueryFormatter const & Lightweight::SqlDeleteQueryBuilder::Formatter ( ) const
inlinenoexcept

Returns the SQL query formatter.

Definition at line 35 of file Delete.hpp.

◆ ToSql()

LIGHTWEIGHT_FORCE_INLINE std::string Lightweight::SqlDeleteQueryBuilder::ToSql ( ) const
inline

Finalizes building the query as DELETE FROM ... query.

Definition at line 49 of file Delete.hpp.

References Lightweight::SqlQueryFormatter::Delete().


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