366 Commits

Author SHA1 Message Date
Sébastien Rombauts
ed052a36bd Add unit test for bindNoCopy() 2016-07-07 21:53:45 +02:00
Sébastien Rombauts
5056c29f9e Add unit test for bind() of an uint32_t value 2016-07-07 08:50:49 +02:00
Sébastien Rombauts
8275c7fb29 Move #include <sqlite3.h> from Statement.h to the .cpp 2016-07-07 08:43:32 +02:00
Sébastien Rombauts
4dd7b84dc0 Update changelog with recent additions 2016-07-06 22:21:54 +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
2abcf45bb9 Remove Column::errmsg() method : use Database or Statement equivalents 2016-07-06 21:41:04 +02:00
Sébastien Rombauts
300f278281 Move #include <sqlite3.h> from Column.h to the .cpp 2016-07-06 21:20:19 +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
a2abbf1d96 Fix Doxygen comments 2016-07-05 08:02:23 +02:00
Sébastien Rombauts
db7aefb271 Renamed Backup accessors and use a forward declaration to sqlite3_backup 2016-07-05 07:49:38 +02:00
Sébastien Rombauts
9fa00ea5ed Fix wrong version in Doxygen config file 2016-07-04 18:22:28 +02:00
Sébastien Rombauts
e4e8d9c1d7 Merge #86 from branch 'origin/add-bind-no-copy-pull-request-86' 2016-07-04 18:20:41 +02:00
Sébastien Rombauts
9c03f4e86b Add bindNoCopy() for C-style null-terminated text strings 2016-07-03 16:55:27 +02:00
Sébastien Rombauts
e7384b30a8 Remove unfinished Statement move constructor from PR #86
- see comments in code: needs a move constructor on Statement::Ptr
2016-07-02 14:14:08 +02:00
Sébastien Rombauts
bcdbea2cf8 Style cleanup on top of PR #86 2016-07-02 14:11:02 +02:00
Douglas Heriot
9a07f3918d Fix build on Linux, including cpplint warnings. 2016-07-02 14:05:14 +02:00
Douglas Heriot
a84c04aada Add bindNoCopy methods to allow binding std::string with SQLITE_STATIC.
Should be safe, as long as you can guarantee the std::string exists while executing the query.

Added an accessor to Column that returns a std::string, that can handle BLOB or TEXT values that contain null-bytes.

Also more binding & Column cast support for uint32_t - fixes ambiguous overload errors when using unsigned-integer types.
Note that I didn't use uint64_t, because unsigned 64-bit integers doesn't fit into SQLite (except for using int64_t and dealing with overflow with custom functions).

Added a C++11 move constructor to Statement, to allow storing it inside STL containers (eg. vector).
2016-07-02 14:05:14 +02:00
Sébastien Rombauts
4e7c12f629 Add VariadicBind.h from PR #85 to CMake for Visual Studio
+ fix style issues (cpplint)
2016-07-02 14:04:39 +02:00
Sébastien Rombauts
a28283f1b8 Update cpplint for int32_t C/C++ types 2016-06-30 21:49:52 +02:00
Sébastien Rombauts
0cdb40d614 Use the new SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION from SQLite 3.13 for security reason 2016-06-30 21:48:40 +02:00
Sébastien Rombauts
94c658d828 Update sqlite3 from 3.12.2 to 3.132 (2016-05-18) 2016-06-30 21:48:08 +02:00
Sébastien Rombauts
c5ca1db62c Print cppcheck version at CMake generation 2016-06-30 21:29:04 +02:00
Sébastien Rombauts
390efbd301 Cleanup unit test for Variadic bind() 2016-06-30 21:28:20 +02:00
Sébastien Rombauts
3e56274e69 Add last missing unit-tests to Statement and Transaction 2016-06-30 18:06:51 +02:00
Sébastien Rombauts
c0b2d81db9 Add a unit test for error in exec() 2016-06-30 17:41:23 +02:00
Sébastien Rombauts
249639ca70 Add unit tests for binding parameters by name 2016-06-30 13:19:46 +02:00
Sébastien Rombauts
0c43747065 Add unit tests for statement bindings + removed an assert() for ~Transaction() 2016-06-30 11:35:28 +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
cda4b89f50 A few more unit tests for backups, statement and database
- should get us to 100% on Backup
2016-06-27 17:09:33 +02:00
Sébastien Rombauts
69d9b0805c Minor new unit tests for backups and database busy timeout 2016-06-27 13:10:09 +02:00
Sébastien Rombauts
ef26cf09a1 Update CHANGELOG with recent merge requests 2016-06-27 12:03:03 +02:00
Sébastien Rombauts
d98cc930cc CMake prints the compiler version instead of the Travis script 2016-06-27 11:36:25 +02:00
Sébastien Rombauts
90699f95ea Cleanup post merge request #84 : one more exception constructor 2016-06-27 11:34:25 +02:00
Sébastien Rombauts
bd6c13c6ca Merge pull request #87 from pauldreik/pullrequests/buildvariants
Update travis config to build with several compilers
2016-06-27 09:55:55 +02:00
Paul Dreik
3bdc41ab5c build with several compilers
- multiple versions of gcc
 - multiple versions of c++ standard
 - multiple versions of clang
 - os x
2016-06-27 09:29:22 +02:00
Sébastien Rombauts
50501a41e2 Fix test coverage by using gcov '-lp' options
NOTE: it would be good to also be able to keep unused inline functions,
 but there is a problem between gcc 4.8 and -fkeep-inline-functions
2016-06-21 12:20:23 +02:00
Sébastien Rombauts
435d62e85b Simplify license and coverage badge 2016-06-20 17:03:25 +02:00
Sébastien Rombauts
d00185dee5 Fix usage of coveralls by specifying a project root and valid exclude patterns
- also, send coveralls only for gcc builds
2016-06-20 16:36:48 +02:00
Sébastien Rombauts
b9f3e4d585 Switch to Ubuntu 14.04 Trusty VM : CMake 2.8.12 with add_compile_options() 2016-06-20 13:12:01 +02:00
Sébastien Rombauts
0e81f4a538 Merge pull request #85 from pauldreik/master
Variadic bind convenience function for C++14
2016-06-16 12:10:49 +02:00
Paul Dreik
356c50a342 do not run variadic bind example for c++ older than c++14 2016-06-15 21:01:51 +02:00
Paul Dreik
9234eb3216 polish before pull request 2016-06-15 20:43:11 +02:00
Paul Dreik
4a92dde562 dont include std headers inside our own namespace 2016-06-15 20:39:51 +02:00
Paul Dreik
808a9c894e add unit test for variadic bind 2016-06-15 20:39:20 +02:00
Paul Dreik
3022d50b38 initial submission of variadic template for bind
tested with
CXXFLAGS="-std=c++14" cmake
with gcc 5.3.1.
2016-06-04 22:06:38 +02:00
Sébastien Rombauts
bf61578f59 Merge pull request #84 from DouglasHeriot/exception
Better exception messages when statements fail
2016-05-26 07:29:40 +02:00
Douglas Heriot
2cd31179f4 Use new Exception constructors everywhere appropriate.
Fix compiling with C++11.
Added public assessor methods to Exception class.
Added more Exception constructors as needed.
2016-05-26 12:34:14 +10:00
Douglas Heriot
832e89440f Better exception messages when statements fail
Added new constructor to Exception that takes sqlite3* pointer, allowing for getting more information out. Makes it much easier to debug syntax errors in prepared statements, for example.
2016-05-26 00:34:34 +10:00
Sébastien Rombauts
b55f521ca4 Merge pull request #81 from bretsko/master
Fix Readme speling
2016-04-28 09:59:31 +02:00