|
IronQuery
A SQL-first query builder for C++
|
#include <table.hpp>


Public Member Functions | |
| 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. | |
Public Member Functions inherited from iron_query::VirtualTable | |
| 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 Public Member Functions | |
| 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. | |
Protected Member Functions | |
| Table (std::string name) | |
| Stores a pre-validated table name; only reachable via FromRaw or a subclass. | |
Table with name.
|
overridevirtual |
Renders this table value as single-line SQL text. See also ToStringFormatted for a multi-line, indented rendering.
Implements iron_query::VirtualTable.
|
overridevirtual |
Returns the name as-is; this also covers the aliased subqueries and joins that VirtualTable::As turns into a Table.
Reimplemented from iron_query::VirtualTable.
|
overridevirtual |
Returns the name as-is: a bare table name never needs brackets.
Reimplemented from iron_query::VirtualTable.