[core] Reimplement existing caching within an offline-capable database schema

This commit is contained in:
John Firebaugh
2016-01-26 12:19:04 -08:00
parent 025375ad0b
commit cdedb66387
42 changed files with 1115 additions and 1750 deletions

View File

@@ -115,9 +115,19 @@ template <> void Statement::bind(int offset, std::nullptr_t) {
check(sqlite3_bind_null(stmt, offset));
}
template <> void Statement::bind(int offset, int value) {
template <> void Statement::bind(int offset, int8_t value) {
assert(stmt);
check(sqlite3_bind_int(stmt, offset, value));
check(sqlite3_bind_int64(stmt, offset, value));
}
template <> void Statement::bind(int offset, int16_t value) {
assert(stmt);
check(sqlite3_bind_int64(stmt, offset, value));
}
template <> void Statement::bind(int offset, int32_t value) {
assert(stmt);
check(sqlite3_bind_int64(stmt, offset, value));
}
template <> void Statement::bind(int offset, int64_t value) {
@@ -125,6 +135,26 @@ template <> void Statement::bind(int offset, int64_t value) {
check(sqlite3_bind_int64(stmt, offset, value));
}
template <> void Statement::bind(int offset, uint8_t value) {
assert(stmt);
check(sqlite3_bind_int64(stmt, offset, value));
}
template <> void Statement::bind(int offset, uint16_t value) {
assert(stmt);
check(sqlite3_bind_int64(stmt, offset, value));
}
template <> void Statement::bind(int offset, uint32_t value) {
assert(stmt);
check(sqlite3_bind_int64(stmt, offset, value));
}
template <> void Statement::bind(int offset, float value) {
assert(stmt);
check(sqlite3_bind_double(stmt, offset, value));
}
template <> void Statement::bind(int offset, double value) {
assert(stmt);
check(sqlite3_bind_double(stmt, offset, value));