IronQuery
A SQL-first query builder for C++
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
Expressions and conditions

Value-producing (iron_query::Expr) and predicate-producing (iron_query::Condition) expression builders, plus their supporting types (CASE, COLLATE, operator precedence). More...

Classes

class  iron_query::CaseBuilder
 Transitional representation for CASE WHEN ... END. More...
 
class  iron_query::Collation
 A collation name for use with Expr::Collate. More...
 
class  iron_query::Condition
 A boolean-valued SQL predicate, e.g. the result of a comparison, LIKE/IN/BETWEEN/IS [NOT] NULL, EXISTS, or a logical combination of these. Kept distinct from Expr so that predicate-only positions (WHERE, HAVING, ON, WHEN) cannot silently accept a non-boolean expression, e.g. Where(age) or Where(age + 1). More...
 
class  iron_query::Expr
 Arbitrary SQL expression. More...
 
struct  iron_query::OrderByTerm
 A single ORDER BY term: an expression plus its sort direction and NULL placement. Implicitly constructible from just an Expr for the common ascending case, e.g. OrderBy({col1, {col2, SortDirection::kDescending}}). More...
 
class  iron_query::SelectItem
 A single entry of a SELECT list: an expression, optionally renamed with Expr::As. Kept distinct from Expr because x AS y is legal nowhere else, so Where(x.As("y")) or Expr::Call("ABS", {x.As("y")}) do not compile. More...
 

Enumerations

enum class  iron_query::OperatorPrecedence {
  kSymbol , kDot , kTypecast , kIndex ,
  kUnaryPlus , kCollate , kAt , kExp ,
  kMul , kPlus , kAnyOther , kBetween ,
  kCompare , kIs , kNot , kAnd ,
  kOr , kExtract
}
 Relative binding strength of SQL operators, used by iron_query::Expr::Extract to decide whether a sub-expression needs to be parenthesized when embedded into a larger expression. From https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-PRECEDENCE.
 
enum class  iron_query::SortDirection { kAscending , kDescending }
 Sort direction for a single ORDER BY term. See iron_query::OrderByTerm.
 
enum class  iron_query::NullsOrder { NullsOrder::kDefault , kFirst , kLast }
 Placement of NULLs within an ORDER BY term. See iron_query::OrderByTerm. More...
 

Functions

CaseBuilder iron_query::Case ()
 Handy fabric for CaseBuilder.
 

Detailed Description

Value-producing (iron_query::Expr) and predicate-producing (iron_query::Condition) expression builders, plus their supporting types (CASE, COLLATE, operator precedence).

Enumeration Type Documentation

◆ NullsOrder

enum class iron_query::NullsOrder
strong

Placement of NULLs within an ORDER BY term. See iron_query::OrderByTerm.

Enumerator
kDefault 

No explicit NULLS FIRST/LAST; the server's default applies (PostgreSQL: last for ascending, first for descending).