LiteSQL
updatequery.hpp
Go to the documentation of this file.
1 /* LiteSQL
2  *
3  * The list of contributors at http://litesql.sf.net/
4  *
5  * See LICENSE for copyright information. */
6 
7 #ifndef _litesql_updatequery_hpp
8 #define _litesql_updatequery_hpp
9 
10 #include "litesql/utils.hpp"
11 #include "litesql/expr.hpp"
14 namespace litesql {
15 
18 class UpdateQuery {
19  std::string table;
20  std::string _where;
21  std::vector<std::string> fields;
22  std::vector<std::string> values;
23 public:
24  UpdateQuery(const std::string& t) : table(t), _where("True") {}
25  UpdateQuery& where(const Expr& e);
26  UpdateQuery& set(const FieldType& f, const std::string& value);
27  operator std::string() const;
28  std::string asString() const { return this->operator std::string(); }
29 };
30 }
31 
32 #endif
A base class for expression in WHERE - clause.
Definition: expr.hpp:18
Definition: field.hpp:25
a class that helps creating UPDATE-SQL statements.
Definition: updatequery.hpp:18
Contains Expr-class hierarchy and operator overloadings for them.
includes string.hpp and split.hpp

SourceForge.net Logo