-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsqlite_statement.h
More file actions
43 lines (38 loc) · 1.34 KB
/
sqlite_statement.h
File metadata and controls
43 lines (38 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Copyright (C) 2016, Robin Chou (robin.m.chou@gmail.com)
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef SQLITE_STATEMENT_H
#define SQLITE_STATEMENT_H
#include <string>
#include <sqlite3.h>
using std::string;
class SQLiteStatement
{
public:
SQLiteStatement(sqlite3* sqlite3_handler, const string& stmt);
virtual ~SQLiteStatement();
int bind(const int index, const bool& value);
int bind(const int index, const int32_t& value);
int bind(const int index, const int64_t& value);
int bind(const int index, const double& value);
int bind(const int index, const string& value);
int bind(const int index, const char* value);
int bind(const int index, const void* value, const int size);
int bind(const int index);
private:
sqlite3_stmt* stmt_;
};
#endif /* SQLITE_STATEMENT_H */