If the database is in a different format (ie. UTF-16) the memory that
sqlite3_column_blob() will point to by default will be the native (UTF-16)
encoding. Calling sqlite3_column_bytes() will basically be a noop for
a BLOB or a TEXT already in UTF-8. Otherwise it'll convert to TEXT w/UTF-8.
Run the 'basis' tests against both a UTF-8 and a UTF-16 database.
Reset & rerun query between tests blocks to reset column types.
Reorder a few getText()/getString() operations to ensure we test both ordering.
Don't try to convert random blob to TEXT. Will fail encoding conversion.
long & long long api have been replaced by int32_t and int64_t types
TODO: we need to continue cleanup APIs to remove all long from the codebase before we can release a new version
using long long may be ambigous for the compiler in the call of bind()
using a fixed type(int64_t) solves this issue
this issue was replicated on both Arch Linux&Windows
with clang 13.0.1/14.0.1
macOS flat out refuses to compile if you touch std::filesystem when
targetting macOS < 10.15 (to be able to deploy a binary to older macOS
versions).
This disables the std::filesystem support when in C++17 mode with such a
target.
* Add Database constructor for filesystem::path #296
* Fixed incorrect MSVC version value for C++17
* Updated another incorrect version string
* Updated MSVC compiler check again. The <filesystem> header wasn't transitioned from std::experimental until MSVC 15.7
* Changed version check to look at c++ version no MSVC version
Similar to Statement::tryExecuteStep(), allows calls to sqlite3_exec()
with the caller assuming responsibility for checking and handling the
returned status.
* Added SQLite header parsing functionality and associated tests
* Removed unused header file.
* Removed an accidental copy pasted remove() statement
* Replaced stdint with plain old C types for now. Will apply fixed with datatypes to cpp11 branch
* Added test scenarios to simulate blank file name, non existant file and a corrupt header
* Refactored exception flow to match latest tidying, brought casts out of function calls and cleared up invalid header exception message
added the option to use a tuple with values to bind.
use this to implement executeMany as described in #24, so it will be possible to pass multiple tuples
The implicit cast to std::string() would fallback to const char* with MSVC 2010-2013 (witch does not work with the NULL char in the middle)
Without it, trying to access a binary blob with implicit cast to string
ends up converting it to a C-style char*, damaging the data by truncating it to the first null character!