Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
statement.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Contact: Jan Olszak <j.olszak@samsung.com>
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License
17  */
18 
25 #ifndef CARGO_SQLITE3_CARGO_SQLITE_SQLITE3_STATEMENT_HPP
26 #define CARGO_SQLITE3_CARGO_SQLITE_SQLITE3_STATEMENT_HPP
27 
29 
30 #include <sqlite3.h>
31 #include <string>
32 
33 namespace cargo {
34 namespace sqlite3 {
35 
36 struct Statement {
37 
42  Statement(sqlite3::Connection& connRef, const std::string& query);
43  ~Statement();
44 
48  sqlite3_stmt* get();
49 
54  void reset();
55 
56 private:
57  ::sqlite3_stmt* mStmtPtr;
59 };
60 
61 } // namespace sqlite3
62 } // namespace cargo
63 
64 #endif // CARGO_SQLITE3_CARGO_SQLITE_SQLITE3_STATEMENT_HPP
::sqlite3_stmt * mStmtPtr
Definition: statement.hpp:57
void reset()
Clears the bindings and resets the statement.
Definition: statement.cpp:63
Declaration of the class managing a sqlite3 database connection.
Definition: connection.hpp:34
Definition: statement.hpp:36
Statement(sqlite3::Connection &connRef, const std::string &query)
Definition: statement.cpp:32
sqlite3::Connection & mConnRef
Definition: statement.hpp:58