Transitional representation for DELETE FROM query.
More...
#include <delete_from.hpp>
|
|
| DeleteFrom (const Table &tbl) |
| | Starts a DELETE FROM tbl query.
|
| |
| DeleteFrom | Using (const VirtualTable &tbl) && |
| | Sets the USING clause, so WHERE expressions may reference columns of tbl. tbl may be a table, a join, or anything VirtualTable::As has aliased.
|
| |
| DeleteFrom | Where (Condition exp) && |
| | Sets the WHERE clause.
|
| |
| DeleteFrom | Returning (SelectItem item) && |
| | Sets the RETURNING clause to a single entry.
|
| |
| DeleteFrom | Returning (std::initializer_list< SelectItem > items) && |
| | Sets the RETURNING clause to a comma-separated list of entries.
|
| |
| std::string | ToString () const override |
| |
| virtual std::string | ToStringFormatted () const |
| | Renders this table value as multi-line, indented SQL text for readability (e.g. logging/debugging a generated query). Defaults to ToString; overridden by SelectExpr to lay out each clause on its own line.
|
| |
| virtual std::string | ToStringBracketed () const |
| | Renders this table value as SQL text, parenthesized so it can be safely embedded as a subquery. Overridden by Table to skip bracketing, since a bare table name never needs it.
|
| |
| virtual std::string | ToStringAsFromItem () const |
| | Renders this table value as a FROM item. Distinct from ToStringBracketed because PostgreSQL's table_ref grammar accepts a bare join but parenthesizes one only when an alias follows.
|
| |
| Table | As (std::string_view name) const |
| | Aliases this table value as this AS name, usable as a FROM source. name must be a valid (optionally dotted) SQL identifier.
|
| |
| | operator Expr () const && |
| | Converts this table value into a subquery expression, e.g. for use as a scalar subquery. Only available on rvalues.
|
| |
Transitional representation for DELETE FROM query.
- See also
- https://www.postgresql.org/docs/current/sql-delete.html
◆ Returning() [1/2]
Sets the RETURNING clause to a single entry.
- Exceptions
-
| LogicError | if the RETURNING clause was already set. |
◆ Returning() [2/2]
Sets the RETURNING clause to a comma-separated list of entries.
- Exceptions
-
| LogicError | if the RETURNING clause was already set. |
◆ ToString()
| std::string iron_query::DeleteFrom::ToString |
( |
| ) |
const |
|
overridevirtual |
◆ Using()
Sets the USING clause, so WHERE expressions may reference columns of tbl. tbl may be a table, a join, or anything VirtualTable::As has aliased.
- Exceptions
-
| LogicError | if tbl is a subquery without an alias, or if the USING clause was already set. |
◆ Where()
Sets the WHERE clause.
- Exceptions
-
The documentation for this class was generated from the following file: