Commit Graph

22 Commits

Author SHA1 Message Date
Vadim Zeitlin
b85ec90c65 Check that inserting malformed XML values fails
Skip this test for Firebird which doesn't have real XML support.
2017-09-15 17:31:04 +02:00
Vadim Zeitlin
bd236c8c8e Merge branch 'xml-firebird'
Closes #578.
2017-09-15 00:32:12 +02:00
Vadim Zeitlin
63bcc89440 Add workaround for empty strings being null in Oracle
Oracle historically treats empty VARCHAR[2] column values as nulls, so
we need to adjust the string length unit test to provide indicators when
retrieving the value of a possibly null string and use nvl() to compute
its length to make this test pass when using this backend.
2017-09-14 15:03:45 +02:00
Vadim Zeitlin
85159db6f9 Refactor: move XML and CLOB tests to common code
Don't duplicate them for PostgreSQL and Oracle, especially because they
will be needed for other backends in the future too.
2017-09-13 15:09:35 +02:00
Vadim Zeitlin
c6aef12b1e Add test checking string length when using bulk insert
This used to be broken, so add a test to check that it works after the
changes of the last commit and to avoid breaking it again.
2017-07-22 01:18:03 +02:00
Sergei Nikulov
b510e1a63d moved to latest Catch UT Framework (#544)
* Moved to latest Catch UT Framework
* Added -Wextra to gcc and clang
* Fixed discovered issues
2017-07-07 21:31:41 +03:00
Maciej Sobczak
6eb1a3e977 Fixed handling of empty long strings. 2016-10-22 22:10:46 +02:00
Maciej Sobczak
e7194837e5 Added empty_blob() and nvl() to portable utilities. 2016-10-17 22:12:37 +02:00
Maciej Sobczak
45eaff9e98 Added handling of big string in DDL. 2016-10-14 22:19:50 +02:00
Maciej Sobczak
1655a195ee Added bigstring (XML and CLOB) support. 2016-10-10 22:58:26 +02:00
Maciej Sobczak
4b0dbab3e4 Added uniform offset for BLOB read/write operations. 2016-10-01 22:20:08 +02:00
Maciej Sobczak
8d29016756 Added unit tests and docs for bulk iterators. 2016-07-07 22:05:50 +02:00
Maciej Sobczak
2a8e8965e7 Added PostgreSQL unit tests for DDL and metadata. 2016-06-27 22:17:52 +02:00
James E. King, III
60abeb88c7 add a unit test for the postgresql uuid data type 2015-10-08 15:53:23 -04:00
Miha Ravselj
7623f76fe1 More and better MSVC warnings fixes.
Fix warnings by changing the code whenever possible, in particular remove
firebird_rowid_backend class and src/backends/firebird/row-id.cpp file in
which it was defined entirely as it only resulted in "unreachable code"
warnings but was otherwise unused.

Also avoid implicit conversions by either using the correct types or by making
the casts explicit using static_cast<> in places where the casts are really
needed.

Add helpful SOCI_NOT_COPYABLE, SOCI_NOT_ASSIGNABLE and SOCI_UNUSED macros and
use them to suppress the corresponding warnings.

Finally, combine soci-config.h and soci-platform.h in a single file, always
include the latter as the first header and keep the former as a wrapper for
the latter just for compatibility.

Remove the MSVC "#pragma warning(disable: *)" as they are not needed any more.

Closes #355.
2015-07-15 03:37:25 +02:00
Benjamin Blundell
ffbfdc0ef5 Inlined the pragmas for the C++11 tests 2015-05-22 14:46:36 +01:00
Mateusz Loskot
7d7516d417 Add more qualifications uses of session class with namespace soci::session.
This should solve compilation errors on OSX where struct session defined in
global namespace in /usr/include/sys/proc.h conflicts with unqualified uses of
soci::session.
Fixes #340
2015-05-19 21:00:54 +02:00
Mateusz Loskot
1e89d43640 Fully qualify uses of session class with namespace soci::session.
This should solve compilation errors on OSX where struct session defined in
global namespace in /usr/include/sys/proc.h conflicts with unqualified uses of
soci::session.
Fixes #340
2015-05-19 14:12:12 +02:00
Mateusz Loskot
3494b2ba6b Wrap stream operator for boost::optional<int> with HAVE_BOOST 2015-05-19 10:23:43 +02:00
Benjamin Blundell
48a8bfab0e Added the C++11 changes back in 2015-05-18 13:59:08 +01:00
Vadim Zeitlin
76b3089bcc Add soci_error::get_error_message() method.
This will only become useful after the upcoming commits which will extend
what() to return more information about the exception, but commit this
separately as there are only trivial changes in this commit: just use
std::string returned by get_error_message() instead of char* returned by
what() in the tests.
2015-04-01 14:52:58 +02:00
Vadim Zeitlin
c9dbe19041 Move all tests from tests/assert to tests directory itself.
"assert" in the name of the directory doesn't make any sense any more as we
don't use asserts in the test code now that we use CATCH.

Also extend the tests description in the README.md.
2015-04-01 14:41:35 +02:00