matador::column Struct Reference

Represents a database column. More...

#include <column.hpp>

Inherits detail::token.

Public Member Functions

 column (std::string col, const field_attributes &attr=null_attributes)
 Creates a new column with given name.
 
 column (std::string name, const matador::any &val, const field_attributes &attr)
 
 column (std::string name, t_build_options options, const field_attributes &attr=null_attributes)
 Creates a new column with given name.
 
template<typename Type >
 column (std::string name, const Type &val, const field_attributes &attr, typename std::enable_if<!std::is_same< Type, matador::any >::value >::type *=0)
 
void accept (token_visitor &visitor) override
 Interface according to the visitor pattern.
 

Public Attributes

std::string name
 
t_build_options build_options {t_build_options::with_quotes}
 
value val
 
data_type type {data_type::type_unknown}
 
field_attributes attributes
 
std::size_t index {}
 

Detailed Description

Represents a database column.

Represents a database column consisting of name.

Constructor & Destructor Documentation

◆ column() [1/2]

matador::column::column ( std::string  col,
const field_attributes attr = null_attributes 
)
explicit

Creates a new column with given name.

Parameters
colThe name of the column
attrField attributes of the column

◆ column() [2/2]

matador::column::column ( std::string  name,
t_build_options  options,
const field_attributes attr = null_attributes 
)

Creates a new column with given name.

Parameters
nameThe name of the column
optionsTrue if the column shouldn't get quotes
attrField attributes of the column

Member Function Documentation

◆ accept()

void matador::column::accept ( token_visitor &  visitor)
override

Interface according to the visitor pattern.

Parameters
visitorThe visitor object to be accepted

Member Data Documentation

◆ name

std::string matador::column::name

Name of the column


The documentation for this struct was generated from the following file:
  • matador/sql/column.hpp