Table with associated columns. Usually not created by hands.
More...
#include <table_with_columns.hpp>
|
|
Expr | SelectArgAll () const |
| | Builds a comma-separated Expr listing all column names, for use as a SELECT list.
|
| |
| TableWithColumns | As (std::string_view name) const |
| | Aliases this table as this AS name, preserving its column list so Dot can verify a referenced column actually belongs to this table. Hides VirtualTable::As, which would otherwise discard the column list.
|
| |
| Expr | Dot (const std::string &column_name) const |
| | Qualifies column_name as alias.column_name.
|
| |
| Expr | Dot (const Column &column) const |
| | Qualifies column as alias.column.name.
|
| |
| std::string | ToString () const override |
| | Renders this table value as single-line SQL text. See also ToStringFormatted for a multi-line, indented rendering.
|
| |
| std::string | ToStringBracketed () const override |
| | Returns the name as-is: a bare table name never needs brackets.
|
| |
| std::string | ToStringAsFromItem () const override |
| | Returns the name as-is; this also covers the aliased subqueries and joins that VirtualTable::As turns into a Table.
|
| |
| 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.
|
| |
| 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.
|
| |
|
|
static TableWithColumns | FromRaw (std::string name, std::vector< Column > columns) |
| | Attaches a set of columns to a trusted, developer-written table name. Never pass untrusted/dynamic data as name.
|
| |
|
static TableWithColumns | FromRaw (std::string name, std::initializer_list< Column > columns) |
| | Attaches a set of columns to a trusted, developer-written table name. Never pass untrusted/dynamic data as name.
|
| |
|
static Table | FromRaw (std::string name) |
| | Wraps a trusted, developer-written table name/reference. Never pass untrusted/dynamic data here — use Expr::Ident to escape a dynamically-sourced name and pass it as an alias/expression instead.
|
| |
|
|
| Table (std::string name) |
| | Stores a pre-validated table name; only reachable via FromRaw or a subclass.
|
| |
Table with associated columns. Usually not created by hands.
◆ As()
| TableWithColumns iron_query::TableWithColumns::As |
( |
std::string_view |
name | ) |
const |
Aliases this table as this AS name, preserving its column list so Dot can verify a referenced column actually belongs to this table. Hides VirtualTable::As, which would otherwise discard the column list.
- Exceptions
-
◆ Dot() [1/2]
| Expr iron_query::TableWithColumns::Dot |
( |
const Column & |
column | ) |
const |
Qualifies column as alias.column.name.
- Exceptions
-
◆ Dot() [2/2]
| Expr iron_query::TableWithColumns::Dot |
( |
const std::string & |
column_name | ) |
const |
Qualifies column_name as alias.column_name.
- Exceptions
-
The documentation for this class was generated from the following file: