mirror of
https://github.com/getml/sqlgen.git
synced 2026-01-05 00:49:58 -06:00
committed by
GitHub
parent
e6b468af9b
commit
e4cf6c802b
@@ -22,7 +22,6 @@ void assign_if_field_is_field_i(
|
||||
const std::vector<std::optional<std::string>>& _row, const size_t _i,
|
||||
ViewType* _view, std::optional<Error>* _err) noexcept {
|
||||
using FieldType = rfl::tuple_element_t<i, typename ViewType::Fields>;
|
||||
using OriginalType = typename FieldType::Type;
|
||||
using T =
|
||||
std::remove_cvref_t<std::remove_pointer_t<typename FieldType::Type>>;
|
||||
constexpr auto name = FieldType::name();
|
||||
|
||||
@@ -103,11 +103,11 @@ Result<Ref<IteratorBase>> 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::StmtPtr> 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) {
|
||||
|
||||
Reference in New Issue
Block a user