diff --git a/include/sqlgen/internal/from_str_vec.hpp b/include/sqlgen/internal/from_str_vec.hpp index 32c92e5..f919ef9 100644 --- a/include/sqlgen/internal/from_str_vec.hpp +++ b/include/sqlgen/internal/from_str_vec.hpp @@ -22,7 +22,6 @@ void assign_if_field_is_field_i( const std::vector>& _row, const size_t _i, ViewType* _view, std::optional* _err) noexcept { using FieldType = rfl::tuple_element_t; - using OriginalType = typename FieldType::Type; using T = std::remove_cvref_t>; constexpr auto name = FieldType::name(); diff --git a/src/sqlgen/sqlite/Connection.cpp b/src/sqlgen/sqlite/Connection.cpp index 990bc6f..b5d3cdf 100644 --- a/src/sqlgen/sqlite/Connection.cpp +++ b/src/sqlgen/sqlite/Connection.cpp @@ -103,11 +103,11 @@ Result> Connection::read_impl( sqlite3_stmt* p_stmt = nullptr; - sqlite3_prepare(conn_.get(), /* Database handle */ - sql.c_str(), /* SQL statement, UTF-8 encoded */ - sql.size(), /* Maximum length of zSql in bytes. */ - &p_stmt, /* OUT: Statement handle */ - nullptr /* OUT: Pointer to unused portion of zSql */ + sqlite3_prepare_v2(conn_.get(), /* Database handle */ + sql.c_str(), /* SQL statement, UTF-8 encoded */ + sql.size(), /* Maximum length of zSql in bytes. */ + &p_stmt, /* OUT: Statement handle */ + nullptr /* OUT: Pointer to unused portion of zSql */ ); if (!p_stmt) { @@ -124,11 +124,11 @@ Result Connection::prepare_statement( const std::string& _sql) const noexcept { sqlite3_stmt* p_stmt = nullptr; - sqlite3_prepare(conn_.get(), /* Database handle */ - _sql.c_str(), /* SQL statement, UTF-8 encoded */ - _sql.size(), /* Maximum length of zSql in bytes. */ - &p_stmt, /* OUT: Statement handle */ - nullptr /* OUT: Pointer to unused portion of zSql */ + sqlite3_prepare_v2(conn_.get(), /* Database handle */ + _sql.c_str(), /* SQL statement, UTF-8 encoded */ + _sql.size(), /* Maximum length of zSql in bytes. */ + &p_stmt, /* OUT: Statement handle */ + nullptr /* OUT: Pointer to unused portion of zSql */ ); if (!p_stmt) {