IronQuery
A SQL-first query builder for C++
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
iron_query::Column Struct Referencefinal

SQL table column. More...

#include <column.hpp>

Public Member Functions

 operator Expr () const
 Converts this column reference into an Expr wrapping its name.
 
Expr ToExpr () const
 Explicitly converts this column reference into an Expr wrapping its name, for calling Expr members Column has no dedicated overload for (e.g. col.ToExpr().IsNull(), col.ToExpr().Between(a, b)).
 
SelectItem As (std::string_view alias) const
 Names this column in a SELECT list: this AS alias.
 

Public Attributes

std::string name
 Column name.
 
std::string type
 
bool is_nullable {false}
 Whether column value can be NULL.
 

Detailed Description

SQL table column.

Member Function Documentation

◆ As()

SelectItem iron_query::Column::As ( std::string_view  alias) const

Names this column in a SELECT list: this AS alias.

Exceptions
InvalidIdentifierif alias is not a valid identifier.

Member Data Documentation

◆ type

std::string iron_query::Column::type

Type as defined in current SQL dialect

Note
This field is metadata only: IQ never consults it to validate that a compared/assigned Expr matches the column's declared type (see Expr's class-level
).

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