summaryrefslogtreecommitdiff
path: root/platform/default/sqlite3.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-02-05 17:10:13 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-02-10 15:40:20 -0800
commitc3c4c7b9a695ad1dbebe57242ba071103fe9a567 (patch)
treee205ecdc6a2f6318c6ba6308b5aa8baacc42f481 /platform/default/sqlite3.hpp
parente9302c797f68c7e48b908b87b126045c8c5e5209 (diff)
downloadqtlocation-mapboxgl-c3c4c7b9a695ad1dbebe57242ba071103fe9a567.tar.gz
[core] Interface and implementation for offline
Diffstat (limited to 'platform/default/sqlite3.hpp')
-rw-r--r--platform/default/sqlite3.hpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/platform/default/sqlite3.hpp b/platform/default/sqlite3.hpp
index 29e8967db3..cdfd5dc8de 100644
--- a/platform/default/sqlite3.hpp
+++ b/platform/default/sqlite3.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <string>
+#include <vector>
#include <stdexcept>
typedef struct sqlite3 sqlite3;
@@ -43,6 +44,8 @@ public:
void exec(const std::string &sql);
Statement prepare(const char *query);
+ int64_t lastInsertRowid() const;
+
private:
sqlite3 *db = nullptr;
};
@@ -63,7 +66,15 @@ public:
operator bool() const;
template <typename T> void bind(int offset, T value);
- void bind(int offset, const std::string &value, bool retain = true);
+
+ // Text
+ void bind(int offset, const char *, std::size_t length, bool retain = true);
+ void bind(int offset, const std::string&, bool retain = true);
+
+ // Blob
+ void bindBlob(int offset, const void *, std::size_t length, bool retain = true);
+ void bindBlob(int offset, const std::vector<uint8_t>&, bool retain = true);
+
template <typename T> T get(int offset);
bool run();