22 Returns(
const std::string& column) :
24 Returns(
const std::string& column,
const std::string& alias) :
25 m_column(column), m_alias(alias) {};
26 Returns(
const std::string& column,
const std::string& alias,
const std::string& format) :
27 m_column(column), m_alias(alias), m_format(format) {};
29 void format(
const std::string format)
33 void timezone(
const std::string timezone)
35 m_timezone = timezone;
39 std::ostringstream json;
41 if ((! m_alias.empty()) || (! m_format.empty()) || (! m_timezone.empty()))
44 json <<
"\"column\" : \"" << m_column <<
"\"";
45 if (! m_alias.empty())
46 json <<
", \"alias\" : \"" << m_alias <<
"\"";
47 if (! m_format.empty())
48 json <<
", \"format\" : \"" << m_format <<
"\"";
49 if (! m_timezone.empty())
50 json <<
", \"timezone\" : \"" << m_timezone <<
"\"";
55 json <<
"\"" << m_column <<
"\"";
60 const std::string m_column;
61 const std::string m_alias;
63 std::string m_timezone;
Control a returned column.
Definition: returns.h:20