This was broken by 99d26063 (Fix handling of identifiers with colons in
PostgreSQL backend, 2020-01-27), see #782.
Fix this and add a test checking for the use of such identifiers.
Closes#840.
Use fully qualified "soci::session" type name to avoid conflicts with
"session" struct declared in sys/proc.h under macOS.
This is a recurrent problem (see #605 for a previous example of it)
which should probably be solved by removing "using namespace soci" from
the test to prevent it from happening again.
Closes#832.
Colon inside identifiers was still interpreted specially by SOCI, even
when they were quoted.
Fix this by suppressing the colon special meaning inside quotes.
Closes https://github.com/SOCI/soci/pull/782
Catch soci_error (and std::bad_cast in one place) by reference rather
than by value to avoid slicing -- even if it doesn't matter in the test
code, it still provokes the new g++-8 warning about it.
See #640.
MSVC++ 1900+ always compile with C++11 mode enabled, so it should be
safe to selectively enable 'override'specifier for internal use.
It does not enable all C++11 features for SOCI and we still compile
with C++11 compilation mode SOCI_CXX_C11=OFF by default.
Refactoring performed with clang-tidy-4.0:
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSOCI_CXX_C11=ON ..
run-clang-tidy.py -clang-tidy-binary -header-filter='.*' \
-checks='-*,modernize-use-modernize' -fix
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.
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.
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
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
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.
"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.