122 Commits

Author SHA1 Message Date
Sébastien Rombauts
09dd10886c Release 2.3.0 2019-03-03 20:53:02 +01: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
df7d113a3b Add test case to try to repro the reported ambiguous bind() int64_t on LP64 Android 2019-03-02 23:43:03 +01:00
Sébastien Rombauts
2cb3cb2fef Update copyright notice 2019-03-02 15:46:53 +01:00
Sébastien Rombauts
9667c523a0
Merge pull request #157 from hubslave/patch-1
Add a move constructor to Database
2019-02-13 09:10:03 +01:00
Jakub Fornadel
b280587204
Update VariadicBind.h
Remove warning: expression result unused [-Wunused-value]
https://stackoverflow.com/questions/14370043/can-operators-be-overloaded-for-initializer-list-literals
2018-12-18 11:44:35 +01:00
hubslave
65f719d82b
Add a move constructor to Database
This makes it possible to e.g. return Databases from functions. Gated behind a __cplusplus >= 201103L check for compatibility with older C++ versions.
2018-03-29 16:48:16 +03:00
Sébastien Rombauts
a41629f9ed Fix #155 Statement::bind truncates long integer to 32 bits on x86_64 Linux
Reproduced the problem with a dedicated unit test, then fixed the bug.

Thanks @tszypenbejl for the clear analysis and the fix.
2018-02-23 17:10:53 +01:00
Sébastien Rombauts
d020c5f694 Update copyright notices to 2018 2018-01-24 11:26:38 +01:00
Sébastien Rombauts
86985dfd1f Fix nullptr detection with AppleClang 2017-12-17 21:42:23 +01:00
Sébastien Rombauts
5ed4a1ab79 nullptr compatibility: special detection for clang 2017-12-13 17:18:48 +01:00
Sébastien Rombauts
4f32da182c Add my Utils.h file to define nullptr on C++98 and C++03 compilers 2017-12-13 10:34:55 +01:00
Alexander Guettler
cebea884c3
Add the fix from a3160dcfc2f80f692f3477a67c202ff87f75fa5a also to the bind by name functions 2017-11-09 11:05:01 -08:00
Sébastien Rombauts
a3160dcfc2 Add Statement binding for long int values to Fix #147 2017-11-06 13:02:23 +01:00
Sébastien Rombauts
eb065bf741 Update version to 2.2.0 2017-09-19 15:17:26 +02:00
Sébastien Rombauts
4f7899c959 Rename Statement::mbIsOk to mbHasRow 2017-08-28 17:17:18 +02:00
Sébastien Rombauts
c14d884ba5 Mutualize code into tryExecuteStep() from PR #142 using SQLITE_MISUSE when statement needs to be reseted 2017-08-28 17:10:38 +02:00
Sébastien Rombauts
94c7897d1b Cleanup on PR #142 : remove whitespaces and mutualize some code 2017-08-28 16:00:50 +02:00
Henrik Jakobsson Majava
8191046ea5 Added tryExecuteStep and tryReset 2017-08-28 11:00:17 +02:00
Sébastien Rombauts
1a46a942b3 Merge pull request #140 from fekir/clean_destructors
Remove virtual destructor since there are no virtual methods or subclasses
2017-08-22 22:38:04 +02:00
fekir
ec8253236b Remove virtual destructor since there are no virtual methods or subclasses 2017-08-22 18:32:40 +02:00
Sébastien Rombauts
5479cc09bf Merge pull request #139 from fekir/clean_destructors
Remove unnecessary noexcept identifier from destructors
2017-08-22 11:07:03 +02:00
fekir
1fd32277c1 Remove unnecessary noexcept identifier from destructors 2017-08-21 22:01:21 +02:00
Sébastien Rombauts
926ebdab8f Merge pull request #137 from fekir/remove_noexcept
Remove noexcept
2017-08-21 11:12:16 +02:00
fekir
67ac88fb1e Add SQLite::Exception constructor that takes const char* in order to avoid possible std::bad_alloc exception
std::runtime_error provides such overload in c++11, therefore it will make no difference when compiling for c++03, but should provide no harm either
2017-08-19 08:59:57 +02:00
fekir
94ebe5ced6 Add default copy constructor to exception class
The throw statement may copy the exception, since exception are thrown by value
Having const members disables the assignment operator
2017-08-19 08:53:01 +02:00
fekir
db156e6282 Remove noexcept from setBusyTimeout since it may throw (it is also documented) 2017-08-18 20:20:55 +02:00
fekir
697929cfbe Remove noexcept since std::string constructor may throw 2017-08-18 20:20:29 +02:00
Sébastien Rombauts
670d710f62 Update version to 2.1.0 and add appropriate changelog 2017-07-18 14:56:18 +02:00
Sébastien Rombauts
1a2c7cbba7 Update sqlite3 from 3.13 to 3.19.3 (2017-06-08)
Fix #125 Incompatibility in 3.19.0 using a new CMake variable SQLITE_USE_LEGACY_STRUCT
2017-07-18 14:55:25 +02:00
Sébastien Rombauts
078941cdb1 Fix #130 Statement::getColumns() template function now uses T{} instead of T()
Thanks to @cycycyc for providing this improvement
2017-07-17 15:26:02 +02:00
Timothy Rae
4c339031f0 Remove const from Database::isUnencrypted() return type
Compiling with gcc pedantic mode was leading to a warning: "type qualifiers ignored on function return type"
2017-03-31 12:12:46 +09:00
dunkelfalke
f4a7e7c7ea Update Statement.h
Missing parameter name in the documentation comment
2017-03-21 17:45:39 +01:00
dend
f01a644dc0 Added convenience functions for constructing objects from a row 2017-02-12 22:10:29 -05:00
Jorrit Wronski
f5a25167a4 Debugging GCC build errors remotely is not fun... 2016-12-23 14:16:37 +01:00
Jorrit Wronski
823828fc9e Made encryption test static and fixed the encryption docs 2016-12-23 13:52:59 +01:00
Jorrit Wronski
02f8fe19c0 Fixed some documentation and corrected the encryption detection. 2016-12-23 08:02:13 +01:00
Jorrit Wronski
685ff293c5 moved the key handling to a new function, added a check for an encrypted database 2016-12-22 17:52:06 +01:00
Jorrit Wronski
611ab22458 Added ability to open encrypted databases. 2016-12-01 23:37:22 +01:00
Mikhail Komarov
51885d7aa6 Redundant const specifier removed 2016-09-09 13:31:36 +03:00
Sébastien Rombauts
d04c8699d2 Apply code style 2016-08-05 07:56:20 +02:00
Jens Alfke
30e285ff89 Fixed link errors calling Exception::getErrorCode()
getErrorCode() and getExtendedErrorCode()'s implementations were
accidentally declared as inline in the .cpp file. This causes the
compiler to not generate any code for them, resulting in link errors
when a client calls them.

Fixed by moving the implementations into the header, where they need to
be if they're inline.
2016-08-04 16:36:09 -07:00
Sébastien Rombauts
53c727c68d Update version to 2.0.0 2016-07-25 22:21:04 +02:00
Sébastien Rombauts
648ffe01e8 Add Database::VERSION, getLibVersion() and getLibVersionNumber()
Usefull to get SQLite3 version without including sqlite3.h in application code
2016-07-25 21:53:47 +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
223c14139b Minor comment style cleanups 2016-07-16 17:04:49 +02:00
Sébastien Rombauts
7983b81f75 Mutualize code between getColumn(name) and isColumnNull(name) with a getColumnIndex(name)
- mColumnNames is mutable so that getColumnIndex() and isColumnNull() can be const
2016-07-16 16:33:44 +02:00
Bruno Coelho
f022c6af60 Add option to check if column is null by name 2016-07-15 16:15:34 +01:00
Sébastien Rombauts
401b7361ed Renamed errmsg() and getErrStr() methods to getErrorMsg() and getErrorStr() 2016-07-13 18:37:22 +02:00