Represents a list of database columns. More...
#include <columns.hpp>
Inherits detail::token.
Public Types | |
enum | t_brackets { WITH_BRACKETS , WITHOUT_BRACKETS } |
Public Member Functions | |
columns (const std::initializer_list< std::string > &column_names, t_brackets with_brackets=WITH_BRACKETS) | |
Create a list of columns containing given columns and bracket type. | |
columns (const std::vector< std::string > &column_names, t_brackets with_brackets=WITH_BRACKETS) | |
Create a list of columns containing given columns and bracket type. | |
columns (std::initializer_list< column > cols, t_brackets with_brackets=WITH_BRACKETS) | |
Create a list of columns containing given columns and bracket type. | |
columns (std::initializer_list< std::shared_ptr< column > > cols, t_brackets with_brackets=WITH_BRACKETS) | |
Create a list of columns containing given columns and bracket type. | |
columns (t_brackets with_brackets=WITH_BRACKETS) | |
Creates an empty list of columns. | |
columns (const columns &x) | |
columns & | operator= (const columns &x) |
void | push_back (const std::shared_ptr< column > &col) |
Append a column to the list. | |
columns & | with_brackets () |
Sets columns to be interpreted with surrounding brackets. | |
columns & | without_brackets () |
Sets columns to be interpreted without surrounding brackets. | |
void | accept (token_visitor &visitor) override |
Interface according to the visitor pattern. | |
Static Public Member Functions | |
static columns | all () |
Creates a columns object representing all columns. | |
static column | count_all () |
A shortcut for a count all column. | |
Public Attributes | |
std::vector< std::shared_ptr< column > > | columns_ |
t_brackets | with_brackets_ = WITH_BRACKETS |
Represents a list of database columns.
matador::columns::columns | ( | const std::initializer_list< std::string > & | column_names, |
t_brackets | with_brackets = WITH_BRACKETS |
||
) |
Create a list of columns containing given columns and bracket type.
column_names | The list of column names |
with_brackets | The bracket type |
|
explicit |
Create a list of columns containing given columns and bracket type.
column_names | The list of column names |
with_brackets | The bracket type |
matador::columns::columns | ( | std::initializer_list< column > | cols, |
t_brackets | with_brackets = WITH_BRACKETS |
||
) |
Create a list of columns containing given columns and bracket type.
cols | The list of columns |
with_brackets | The bracket type |
matador::columns::columns | ( | std::initializer_list< std::shared_ptr< column > > | cols, |
t_brackets | with_brackets = WITH_BRACKETS |
||
) |
Create a list of columns containing given columns and bracket type.
cols | The list of columns |
with_brackets | The bracket type |
|
explicit |
Creates an empty list of columns.
with_brackets | The bracket type |
matador::columns::columns | ( | const columns & | x | ) |
Copy column
x | Column to copy |
|
override |
Interface according to the visitor pattern.
visitor | The visitor obejct to be accepted |
|
static |
Creates a columns object representing all columns.
|
static |
A shortcut for a count all column.
Copy assign column
x | Column to copy |
void matador::columns::push_back | ( | const std::shared_ptr< column > & | col | ) |
Append a column to the list.
col | The column to be appended |
columns & matador::columns::with_brackets | ( | ) |
Sets columns to be interpreted with surrounding brackets.
Sets columns to be interpreted with surrounding brackets. After set a references to this is returned.
columns & matador::columns::without_brackets | ( | ) |
Sets columns to be interpreted without surrounding brackets.
Sets columns to be interpreted without surrounding brackets. After set a references to this is returned.
std::vector<std::shared_ptr<column> > matador::columns::columns_ |
The list of column shared pointer
t_brackets matador::columns::with_brackets_ = WITH_BRACKETS |
The bracket type