30 Commits

Author SHA1 Message Date
Sébastien Rombauts
a865d1c61a Update copyright notice to 2025 2025-05-19 21:20:36 +02:00
Sébastien Rombauts
26d5e47fe6 Replace all double-quoted string literals by single quotes
Fix #481 23 test fails under FreeBSD 14.1 builtin SQLite library

The SQLITE_DQS compile-time option activates or deactivates the legacy double-quoted string literal misfeature.
Legacy behavior is that double-quoted string literals are allowed anywhere.
2024-08-17 23:16:14 +02:00
Sébastien Rombauts
1909a777d5 Update copyright notice to 2024 2024-08-16 20:46:14 +02:00
Sébastien Rombauts
d4d57b7f5b Fix inequality assertions for real numbers failing on Valgrind (1/2)
EXPECT_DOUBLE_EQ
2023-08-29 19:11:42 +02:00
Sébastien Rombauts
7dbcf482f2 Update copyright notice to 2023 2023-05-24 18:49:55 +02:00
Doug Nazar
77fc1f30b2 Ensure that TEXT column is UTF-8 encoded before using sqlite3_column_blob()
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.
2022-12-02 14:03:03 -05:00
Sébastien Rombauts
3d149cc62f Removal of removing long APIs 2022-07-24 22:03:55 +02:00
Kacperos155
27a32521b7 Add test for Column std::shared_ptr; remove noexcept from throwing Column constructor 2022-01-26 04:19:10 +01:00
Sébastien Rombauts
64c34bc7bd Added unit tests for new getChanges() and fix comment being too long 2021-07-25 10:46:56 +02:00
Sébastien Rombauts
e6288ee920 Update copyright notice 2020-01-01 08:08:59 +01:00
Sébastien Rombauts
1eda5c751c Minor cleanup of the codebase, mostly putting braces on their own line in unit tests 2019-06-16 15:48:57 +02:00
Sébastien Rombauts
35aaf73191 Add implicit cast operators to char & short and their unsigned variants
Fix #179 error: conversion from 'SQLite::Column' to 'unsigned char' is ambiguous
2019-03-03 09:54:40 +01:00
Sébastien Rombauts
2e69a81ccf Fix #189 unit test "Column.basis" failing on Visual Studio 2013
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!
2019-03-03 08:55:18 +01:00
Sébastien Rombauts
2cb3cb2fef Update copyright notice 2019-03-02 15:46:53 +01:00
Sébastien Rombauts
d020c5f694 Update copyright notices to 2018 2018-01-24 11:26:38 +01:00
Sébastien Rombauts
2286e66d53 Fix a signed/unsigned warning 2017-11-06 13:02:46 +01:00
Sébastien Rombauts
4f7899c959 Rename Statement::mbIsOk to mbHasRow 2017-08-28 17:17:18 +02:00
fekir
d3a10465b5 Remove unused variable 2017-08-18 20:24:36 +02:00
fekir
21ead7c5a4 Ensure that operator<< correctly prints strings with embedded '\0' 2017-08-18 18:24:10 +02:00
Sébastien Rombauts
f77b707206 Revert recent switch from uint32_t/int64_t to use int/unsigned/long/long long and fix #93 2016-07-19 10:56:08 +02:00
Sébastien Rombauts
fd8f50bdd9 Remove last #include <sqlite3.h> from a header : add a few public constants
- Move #include <sqlite3.h> from Exception.h to a new corresponding .cpp
 - Add SQLite::OPEN_READONLY...
2016-07-13 17:16:41 +02:00
Sébastien Rombauts
d9bc842b66 Add unit test of getString() for blob with null character 2016-07-06 22:18:06 +02:00
Sébastien Rombauts
b033abb3fd Add unit tests for the new Column getter and cast operator 2016-07-06 21:20:19 +02:00
Sébastien Rombauts
646d25ca95 Switch from sqlite3_int64 to int64_t 2016-07-05 11:05:16 +02:00
Sébastien Rombauts
b913932be2 Add a unit test for transactions
+ a few small minor new assert in other tests
2016-06-28 13:17:33 +02:00
Sébastien Rombauts
c53d885393 Update copyright notice to 2016 2016-02-10 10:27:47 +01:00
Sébastien Rombauts
078365febc Fix part of issue #34 about 64 bits long with GCC on AMD64 2015-05-03 23:31:02 +02:00
Sébastien Rombauts
f407e4e469 Add unit test for Column names
- improve other Column unit test
2015-05-03 23:30:16 +02:00
Sébastien Rombauts
1ed18ce273 Add unit test about Column operators 2015-05-03 23:30:03 +02:00
Sébastien Rombauts
18620457b1 Add some more Unit Tests 2015-05-03 23:29:22 +02:00