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

Transitional representation for a WITH clause being built up. More...

#include <with.hpp>

Public Member Functions

WithBuilder With (std::string name, const VirtualTable &query) &&
 Adds another CTE: , name AS (query). name must be a valid (optionally dotted) SQL identifier not already used by an earlier CTE in this WITH clause.
 
WithQuery Main (const VirtualTable &query) &&
 Finalizes the WITH clause with the main query that follows it.
 

Friends

WithBuilder With (std::string name, const VirtualTable &query)
 Handy fabric for WithBuilder. name must be a valid (optionally dotted) SQL identifier.
 

Detailed Description

Transitional representation for a WITH clause being built up.

See also
https://www.postgresql.org/docs/current/queries-with.html

Member Function Documentation

◆ With()

WithBuilder iron_query::WithBuilder::With ( std::string  name,
const VirtualTable query 
) &&

Adds another CTE: , name AS (query). name must be a valid (optionally dotted) SQL identifier not already used by an earlier CTE in this WITH clause.

Exceptions
InvalidIdentifierif name is not a valid identifier.
LogicErrorif name was already used by an earlier CTE.
Note
Does not track the CTE's resulting column shape/types, so mismatches when the CTE is later referenced elsewhere are not caught.

Friends And Related Symbol Documentation

◆ With

WithBuilder With ( std::string  name,
const VirtualTable query 
)
friend

Handy fabric for WithBuilder. name must be a valid (optionally dotted) SQL identifier.

Exceptions
InvalidIdentifierif name is not a valid identifier.

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