Sébastien Rombauts
ed052a36bd
Add unit test for bindNoCopy()
2016-07-07 21:53:45 +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
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
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
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
90699f95ea
Cleanup post merge request #84 : one more exception constructor
2016-06-27 11:34:25 +02:00
Paul Dreik
4a92dde562
dont include std headers inside our own namespace
2016-06-15 20:39:51 +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
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
2210b30b52
Update sqlite3 from v3.9.2 to 3.10.2 (2016-01-20) and update version to 1.3.1
2016-02-10 11:45:22 +01:00
Sébastien Rombauts
c53d885393
Update copyright notice to 2016
2016-02-10 10:27:47 +01:00
Sébastien Rombauts
b7b440de5d
Fix #73 Wrong exception thrown by Database constructor
...
- switched from sqlite3_errmsg() to sqlite3_errstr() where applicable
2015-11-10 18:32:24 +01:00
Sébastien Rombauts
8f28c4c58f
Update version to 1.3.0 with new Backup class
2015-11-01 21:53:26 +01:00
Sébastien Rombauts
544ecf4101
Remove unneeded Backup::getHandle() accessor
2015-11-01 21:29:52 +01:00
hongshibao
e8f956be22
Add Backup test
2015-10-28 03:04:13 +08:00
hongshibao
5b312edb31
Add Comments
2015-10-26 01:38:29 +08:00
hongshibao
c9dcf64cd0
Add throw exception case in executeStep
...
Add Comments
2015-10-26 00:35:36 +08:00
hongshibao
05d304b7c9
add Backup class
2015-10-25 18:31:16 +08:00
Sébastien Rombauts
18aa9e4def
Fix a too long comment
2015-10-07 22:26:58 +02:00
LEE Wondong
d7603db7d3
Fix Column::operator std::string to work properly on Visual C++ 2015
2015-09-23 14:57:08 +09:00
Sébastien Rombauts
de2fd218a1
Update version to 1.2.0 with new getHandle()
2015-09-09 19:02:34 +02:00
Sébastien Rombauts
4bd8786e6a
Fix #65 Database::getHandle() exposes underlying SQLite handle
...
- needed to mix with other libraries or advance usage
2015-09-09 18:59:18 +02:00
Sébastien Rombauts
d36c39ccf3
Fix CppDepends most useful warnings:
...
- Convert last old-style cast to reinterpret_cast<>
- Statement::Ptr is now private, with a friend declaration for Column
- noexcept should not be defined as the depreacted throw()
2015-06-01 22:05:24 +02:00
Sébastien Rombauts
16be0dc3aa
Fix #58 "Compile fails in gcc 5.1.0" : correct detection of noexcept support for GCC >= 4.7
2015-05-27 12:26:30 +02:00
Sébastien Rombauts
e4b5d6eeed
Update version to 1.1.0 with bugfix and new loadExtension()
2015-05-18 21:10:48 +02:00
Richard Jones
368049a613
Added support for extension loading
2015-05-08 09:47:12 +01:00
Sébastien Rombauts
09db07ccc7
Updated version to 1.0.0 changelog and copyright date
2015-05-03 23:32:57 +02:00
Sébastien Rombauts
e537195625
Fix #47 setBusyTimeout in constructor
...
- add corresponding Unit Test
2015-05-03 23:32:50 +02:00
Sébastien Rombauts
3c39f1ff1c
Fix 3 new cpplint warnings about max line size
2015-05-03 23:32:40 +02:00
Sébastien Rombauts
b9322fb0ab
Example now print SQLite version
2015-05-03 23:32:31 +02:00
Sébastien Rombauts
f5e0cafa72
Minor fixes to comments and fix the build
2015-05-03 23:32:24 +02:00
Sébastien Rombauts
31dbcda9ad
Minor fixes to comments and an API
2015-05-03 23:32:14 +02:00
Sébastien Rombauts
8797f16d12
Add Statement::getColumnName(aIndex)
...
- enable getting names befor gettings rows of result
2015-05-03 23:32:05 +02: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
acaed41465
setBusyTimeout() now uses check() and throw in case of error
...
- add unit test for setBusyTimeout()
- add unit test for in memory databases
2015-05-03 23:29:31 +02:00
Sébastien Rombauts
18620457b1
Add some more Unit Tests
2015-05-03 23:29:22 +02:00
Sébastien Rombauts
7fbfc29677
Fix #23 optimized Statement::getColumn() by name
...
- fix Statement::getColumn(apName) provided by #45 but was not working
instead of using #46 that conflicts with current master
- rework it by using a map of columns name as
a cache populated the first time the method is called
- add corresponding Unit Test
2015-05-03 23:28:41 +02:00
Sébastien Rombauts
6a2f8a6a8b
Cleanup and comment on the overload for GCC & Clang
2015-05-03 23:28:19 +02:00