Fix a few warnings
This commit is contained in:
@@ -18,5 +18,5 @@ struct Id: Column<std::size_t> {
|
|||||||
static constexpr auto name = "id_";
|
static constexpr auto name = "id_";
|
||||||
static constexpr auto options = "PRIMARY KEY";
|
static constexpr auto options = "PRIMARY KEY";
|
||||||
|
|
||||||
Id(): Column<std::size_t>(-1) {}
|
Id(): Column<std::size_t>(unset_value) {}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ update_autoincrement_id(std::tuple<T...>& columns, Statement& statement)
|
|||||||
|
|
||||||
template <std::size_t N=0, typename... T>
|
template <std::size_t N=0, typename... T>
|
||||||
typename std::enable_if<N == sizeof...(T), void>::type
|
typename std::enable_if<N == sizeof...(T), void>::type
|
||||||
update_autoincrement_id(std::tuple<T...>&, Statement& statement)
|
update_autoincrement_id(std::tuple<T...>&, Statement&)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
struct InsertQuery: public Query
|
struct InsertQuery: public Query
|
||||||
|
|||||||
@@ -21,6 +21,15 @@ void actual_bind(Statement& statement, const OptionalBool& value, int index)
|
|||||||
statement.bind_int64(index, -1);
|
statement.bind_int64(index, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void actual_bind(Statement& statement, const std::size_t value, int index)
|
||||||
|
{
|
||||||
|
actual_bind(statement, static_cast<std::int64_t>(value), index);
|
||||||
|
}
|
||||||
|
|
||||||
|
void actual_bind(Statement& statement, const int value, int index)
|
||||||
|
{
|
||||||
|
actual_bind(statement, static_cast<std::int64_t>(value), index);
|
||||||
|
}
|
||||||
|
|
||||||
void actual_add_param(Query& query, const std::string& val)
|
void actual_add_param(Query& query, const std::string& val)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
void actual_bind(Statement& statement, const std::string& value, int index);
|
void actual_bind(Statement& statement, const std::string& value, int index);
|
||||||
void actual_bind(Statement& statement, const std::int64_t value, int index);
|
void actual_bind(Statement& statement, const std::int64_t value, int index);
|
||||||
|
void actual_bind(Statement& statement, const std::size_t value, int index);
|
||||||
|
void actual_bind(Statement& statement, const int value, int index);
|
||||||
void actual_bind(Statement& statement, const OptionalBool& value, int index);
|
void actual_bind(Statement& statement, const OptionalBool& value, int index);
|
||||||
|
|
||||||
#ifdef DEBUG_SQL_QUERIES
|
#ifdef DEBUG_SQL_QUERIES
|
||||||
|
|||||||
@@ -88,5 +88,4 @@ class Sqlite3Statement: public Statement
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
sqlite3_stmt* stmt;
|
sqlite3_stmt* stmt;
|
||||||
int last_step_result{SQLITE_OK};
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user