1#line 2 "src/Dbo/Vars.cpp"
3#include <Wt/Json/Parser.h>
4#include <Wt/Json/Object.h>
5#include <Wt/Json/Serializer.h>
31 if( _cfyValue !=
"*" )
60 retVal.
modify()-> setKeyField( _keyValue );
62 if( _cfyValue !=
"*" )
63 retVal.
modify()-> setCfyField( _cfyValue );
82 .where(
"\"cfyField\" = '" + _cfyValue +
"'" )
86 for(
auto item : items )
87 retVal.push_back( item );
95getVarString(
const std::string & _field )
const-> std::string
105 catch( std::exception & e )
107 std::cout << __FILE__ <<
":" << __LINE__ <<
" id:" << this-> id() <<
" " << e.what() << std::endl;
120getVarInt(
const std::string & _field )
const->
int
130 catch( std::exception & e )
132 std::cout << __FILE__ <<
":" << __LINE__ <<
" id:" << this-> id() <<
" " << e.what() << std::endl;
145setVar(
const std::string & _field,
const char * _value )->
void
147 setVar( _field, std::string( _value ) );
155 setVar( _field, _value.toUTF8() );
161setVar(
const std::string & _field,
const std::string & _value )->
void
176 catch( std::exception & e )
178 std::cout << __FILE__ <<
":" << __LINE__ <<
" id:" << this-> id() <<
" " << e.what() << std::endl;
189setVar(
const std::string & _field,
int _value )->
void
203 catch( std::exception & e )
205 std::cout << __FILE__ <<
":" << __LINE__ <<
" id:" << this-> id() <<
" " << e.what() << std::endl;
208 jobj[_field] = _value;
std::vector< Ptr > Vector
int getVarInt(const std::string &_field) const
void setVar(const std::string &_field, const char *_value)
std::string getVarString(const std::string &_field) const
const Value & get(const std::string &name) const
const WString & orIfNull(const WString &v) const
std::string toUTF8() const
WString & arg(const std::wstring &value)
void parse(const std::string &input, Value &result, bool validateUTF8=true)
std::string serialize(const Object &obj, int indentation=1)
auto getByCfy(const std::string &_cfyValue) -> GCW::Dbo::Vars::Item::Vector
auto get(const std::string &_keyValue, const std::string &_cfyValue="*", bool _add=true) -> GCW::Dbo::Vars::Item::Ptr