mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-09-08 03:51:36 -04:00
Move #include <sqlite3.h> from Statement.h to the .cpp
This commit is contained in:
parent
4dd7b84dc0
commit
8275c7fb29
@ -90,3 +90,4 @@ Version 1.4.0 - 2016 ?
|
|||||||
Rename Backup::remainingPageCount()/totalPageCount() to Backup::getRemainingPageCount()/getTotalPageCount()
|
Rename Backup::remainingPageCount()/totalPageCount() to Backup::getRemainingPageCount()/getTotalPageCount()
|
||||||
Remove Column::errmsg() method : use Database or Statement equivalents
|
Remove Column::errmsg() method : use Database or Statement equivalents
|
||||||
More unit tests, with code coverage status on the GitHub page
|
More unit tests, with code coverage status on the GitHub page
|
||||||
|
Move #include <sqlite3.h> from headers to .cpp files only using forward declarations
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// Forward declaration to avoid including the sqlite3.h header
|
// Forward declaration to avoid including the <sqlite3.h> header
|
||||||
struct sqlite3_backup;
|
struct sqlite3_backup;
|
||||||
|
|
||||||
namespace SQLite
|
namespace SQLite
|
||||||
|
@ -10,13 +10,16 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <sqlite3.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <SQLiteCpp/Exception.h>
|
#include <SQLiteCpp/Exception.h>
|
||||||
|
|
||||||
|
// Forward declaration to avoid including the <sqlite3.h> header
|
||||||
|
struct sqlite3;
|
||||||
|
struct sqlite3_stmt;
|
||||||
|
|
||||||
|
|
||||||
namespace SQLite
|
namespace SQLite
|
||||||
{
|
{
|
||||||
@ -465,20 +468,11 @@ public:
|
|||||||
return mbDone;
|
return mbDone;
|
||||||
}
|
}
|
||||||
/// Return the numeric result code for the most recent failed API call (if any).
|
/// Return the numeric result code for the most recent failed API call (if any).
|
||||||
inline int getErrorCode() const noexcept // nothrow
|
int getErrorCode() const noexcept; // nothrow
|
||||||
{
|
|
||||||
return sqlite3_errcode(mStmtPtr);
|
|
||||||
}
|
|
||||||
/// Return the extended numeric result code for the most recent failed API call (if any).
|
/// Return the extended numeric result code for the most recent failed API call (if any).
|
||||||
inline int getExtendedErrorCode() const noexcept // nothrow
|
int getExtendedErrorCode() const noexcept; // nothrow
|
||||||
{
|
|
||||||
return sqlite3_extended_errcode(mStmtPtr);
|
|
||||||
}
|
|
||||||
/// Return UTF-8 encoded English language explanation of the most recent failed API call (if any).
|
/// Return UTF-8 encoded English language explanation of the most recent failed API call (if any).
|
||||||
inline const char* errmsg() const noexcept // nothrow
|
const char* errmsg() const noexcept; // nothrow
|
||||||
{
|
|
||||||
return sqlite3_errmsg(mStmtPtr);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <SQLiteCpp/Assertion.h>
|
#include <SQLiteCpp/Assertion.h>
|
||||||
#include <SQLiteCpp/Exception.h>
|
#include <SQLiteCpp/Exception.h>
|
||||||
|
|
||||||
|
#include <sqlite3.h>
|
||||||
|
|
||||||
namespace SQLite
|
namespace SQLite
|
||||||
{
|
{
|
||||||
@ -358,6 +359,22 @@ const char* Statement::getColumnOriginName(const int aIndex) const
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/// Return the numeric result code for the most recent failed API call (if any).
|
||||||
|
int Statement::getErrorCode() const noexcept // nothrow
|
||||||
|
{
|
||||||
|
return sqlite3_errcode(mStmtPtr);
|
||||||
|
}
|
||||||
|
/// Return the extended numeric result code for the most recent failed API call (if any).
|
||||||
|
int Statement::getExtendedErrorCode() const noexcept // nothrow
|
||||||
|
{
|
||||||
|
return sqlite3_extended_errcode(mStmtPtr);
|
||||||
|
}
|
||||||
|
/// Return UTF-8 encoded English language explanation of the most recent failed API call (if any).
|
||||||
|
const char* Statement::errmsg() const noexcept // nothrow
|
||||||
|
{
|
||||||
|
return sqlite3_errmsg(mStmtPtr);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Internal class : shared pointer to the sqlite3_stmt SQLite Statement Object
|
// Internal class : shared pointer to the sqlite3_stmt SQLite Statement Object
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user