Skip to content

Commit caab155

Browse files
committed
Squashed 'src/soci/' changes from 6e9312c..b2855dc
b2855dc Merge pull request XRPLF#378 from ravselj/sqlite_memory_leak bf5dad9 Memory leak fix in sqlite3_session_backend. 165737c Fix incorrect pointer instead pointee comparison. 625db74 Merge pull request XRPLF#376 from ravselj/cmake_debug_postfix2 f3a1055 Added proper support for SOCI_DEBUG_POSTFIX by changing backend-loader macro. If debug postfix is specified in CMake then it is passed forward to soci-core backend loader which then combines proper name based on build configuration. 3459d7d Minor CMake fix that checks if shared mode is set before adding shared test(s). 66d407a Merge pull request XRPLF#373 from musopr/ambiguous_session 9070742 Merge pull request XRPLF#372 from musopr/clang_cxx_c11 7b08ec7 Fixed ambiguous 'session' reference e9748de Include SOCI_CXX_VERSION_FLAGS when compiling Clang abd6775 Merge pull request XRPLF#368 from ravselj/cmake_debug_postfix cae0086 Added CMAKE_DEBUG_POSTFIX to SOCI_LIB_SUFFIX. This fixes backend loading when CMAKE_DEBUG_POSTFIX is used. 3dd4726 Enable MSVC multi process compiling by setting /MP flag.( VS2005+ ) e5f577f Merge pull request XRPLF#365 from ravselj/sqlite_msvc_fixes c4dde08 Some trivial fixes in code to resolve MSVC warnings in SQLite back-end 330f0e0 Merge pull request XRPLF#364 from ravselj/connection_pars b78c8ef Merge pull request XRPLF#358 from ArnaudD-FR/bind_clean_up 9f415ee Merge pull request XRPLF#362 from ArnaudD-FR/sqlite3_optim_split f1f0162 sqlite3 backend optimizations 0b1a835 Include soci-platform.h because of snprintf ac65d58 Merge pull request XRPLF#361 from ArnaudD-FR/blob 24c8383 Bug fix - std::map with key type of const char* is replaced with std::string 3e02a54 Changes due to compiler warnings. 0c88f8c New data_type dt_blob and simple-interface support 403b8de Fix bind_clean_up when using 'row' 92ada95 Merge pull request XRPLF#363 from ravselj/oracle_win_fix d1ad52f Add a unit test for CHAR(N) fields padding behaviour. 274d08a Explicitly set character set in Firebird unit tests for CHAR(N). 7623f76 More and better MSVC warnings fixes. caa2370 Removed dummy and not compilable operator<<(boost::optional). c025cc8 Fix inserting strings longer than 8000 bytes with ODBC/MS SQL. d8d765f Update documentations b5d6507 - oracle cmake Windows fix - test oracle compilation error fix a6b3514 Split Statement::clean_up into bind_clean_up and clean_up ba453c7 Make SQL state in ODBC backend error messages more clear. a374e54 Make ODBC backend error messages more homogeneous. c4255c9 Delete old /docs folder. 0d3b6b9 Merge pull request XRPLF#344 from OniDaito/markdown_doc 04f9461 Merge pull request XRPLF#352 from ravselj/cmake_bug_shared 955a915 - CMake bug fix when building MSVC with SHARED option enabled f7be373 Merge pull request XRPLF#348 from msobczak/classic-makefiles 36f373f Added classic Makefile for PostgreSQL test. 615cb94 Updated classic Makefile for PostgreSQL backend. 821092c Don't use both -ansi and -std=gnu++98 flags with g++. 07543f5 Merge pull request XRPLF#346 from msobczak/classic-makefiles 291fbe7 Merge pull request XRPLF#347 from jsonn/master a87776e Make it easier to override SOCI_LIBDIR. 96e66f5 Corrected handling of generated file with backend search path. 0b26c32 Updated classic Makefiles for Oracle Express 11.2. 15a3705 Removed all the crap debian packaging threw in 6db2a65 Merge pull request XRPLF#343 from OniDaito/master cf11404 Added Markdown docs ffbfdc0 Inlined the pragmas for the C++11 tests ae3ac9d Mistake with CXX11 pragma fixed in session.h 303a966 Merge pull request XRPLF#341 from mloskot/issues/340 7d7516d Add more qualifications uses of session class with namespace soci::session. caa3e2b Merge pull request XRPLF#335 from mloskot/issues/258 1e89d43 Fully qualify uses of session class with namespace soci::session. 1ed81ca Restore setting session with query transformation 84d29e2 Merge branch 'pull/336' 949924a Cope with GNU <=4.6 warning about the #pragma 3494b2b Wrap stream operator for boost::optional<int> with HAVE_BOOST af4b1a3 Report SOCI_CXX_C11 in CMake output 5744a16 Merge branch 'master' of https://github.com/OniDaito/soci into pull/336 0ab7b37 Remove old build .tcl scripts. 8f2195a Check Postgression availability before proceeding with build. cd3af53 Remove #include "error.h" of non-existent header 48a8bfa Added the C++11 changes back in 1aee2d1 Add -Wl,-flat_namespace -Wl,-undefined -Wl,suppress to LINK_FLAGS on Apple/OSX 2bf3aa7 Disable test of set_query_transformation with C++ lambda 1d26033 CMake should not terminate on unknown toolset d8b64cb Remove SociSystemInfo.cmake modul as redundant. fc3391f List Boost.DateTime in core dependencies f4ff281 Indicate Travis CI builds Oracle WITH_BOOST=OFF 4863376 Merge pull request XRPLF#326 from mloskot/issues/224 0c18240 Restore Oracle build with tests on Travis CI. bc4abd7 Throw instead of truncating VARCHAR columns in Firebird backend. 4c612af No changes, just small code simplification in Firebird backend. ba206ed Extract common part of MySQL and ODBC MySQL tests in a header. a0fd859 Remove asserts from the SOCI headers and code. b36944c Check vector indices instead of asserting that they are valid. 75ef8d8 Handle dt_unsigned_long_long in the "simple" SOCI layer. 2e2f60b Remove asserts on unknown type from the "simple" SOCI layer. e21aef7 Throw instead of asserting if connection_pool::lease() fails. 4b4cecb Replace left over asserts with CATCH CHECK in the tests code. 388a8d3 Use compile-time asserts to check SQLINTEGER size. af80fd8 Use SQLT_BDOUBLE instead of SQLT_FLT in Oracle backend. c74132b Fix warning about pointer-to-int conversion in Firebird backend. 4916551 Reorganize more unit tests to use CATCH sections. 787b428 Fix duplicate test name in Oracle unit tests. 7f65799 Avoid warnings about int-to-pointer conversions in DB2 backend. 7e80c68 Use parameter names from the query, if given, in error messages. 8b0c372 Don't clean up SQLite3 statement prematurely. 9119ed8 Rename db2_statement_backend::names field to names_. f5c86b7 Make SOCI_NORETURN public and use it in declaration. 62c17b2 Add mktime_from_ymdhms() helper. ee0b9e4 Fix a clash between CATCH test cases defined in different files. 60a33f4 Reorganize "Use and into" unit test to use CATCH sections. db59a48 Merge pull request XRPLF#314 from rpiotaix/release/3.2 82ea95f Don't add DB2_INCLUDE_DIR to global include directories. 4f570d7 Restore Travis CI builds for other databases 71edca9 Merge pull request XRPLF#306 from mloskot/postgression 1e4b365 Add a Travis build using PostgreSQL server at Postgression. 6abb7e1 Typo 1ccff47 Replace raw & with &amp; entity. 56d3aa6 No real changes, just remove trailing whitespace. ef6d90d Fix previous attempt to correct include of SQLite3 backend header 31a22a1 Include SQLite3 backend public headers using soci/ prefix. e4376ed Merge branch 'master' into develop-3.2.3 111b50a Merge branch 'hotfix/3.2.3' 0ef4912 Add 3.2.3 release notes 8da98b2 Add new contributors ee7e155 Bump version number in docs 30c02f3 Merge branch 'master' of git://github.com/Alex-Vol/soci into hotfix/3.2.3-PR263 5577606 Improve readability of ODBC error message Closes XRPLF#229 8e14c5b Improve error message when an odbc error occurs 8a50af6 Merge branch 'hotfix/3.2.3' of https://github.com/SOCI/soci into hotfix/3.2.3 a948ab3 Remove unused HAVE_XXX defines 2c85be1 Fix missing strtoll on Cygwin and MinGW d9c059e Clarify documenation and examples on bulk operations. a08d750 [travis] Disable Oracle build 70e67aa Replace prefix underscore with suffix in private member names c799e4f Append each member of tuple/fusion instead of adding tuple/fusion 645e7a2 Merge github.com:pacocamberos/soci into pacocamberos-branch-mysql-blob e96bc2b Ignore CMakeLists.txt.user created by Qt Creator IDE f694e30 Bump library version number to 3.2.3 5ecebe9 fixed link error for msvc 64 bit 3278579 Fix email notifications for Travis CI builds. ad9075c Configure Travis CI to fail the build a.s.a.p. 7481868 Explicitly set extra_float_digits when using PostgreSQL in ODBC. 83bbbd4 update sqlite3 backend documentation 57530a1 Merge pull request XRPLF#302 from vadz/rich-exceptions 5cda82a Avoid throwing from soci_error copy ctor and assignment operator. 8bb6610 Provide context of the error in soci_error when possible. a8ba1cb Add use_type_base::dump_value() for richer diagnostics. 76b3089 Add soci_error::get_error_message() method. e8e5978 No real changes, just remove trailing whitespace. a90018b Merge catch-tests branch. 7b8b37b Use REQUIRE() and not CHECK() for a test that can't be allowed to fail. c9dbe19 Move all tests from tests/assert to tests directory itself. 246f657 Convert the tests to use CATCH testing framework. b2060fb Add single header version of CATCH testing framework. b87407e Add values::get_number_of_columns() accessor. 9628081 Define SOCI_NORETURN: a portable __attribute__((noreturn)) equivalent. 6ebcbcd Remove the never used details::statement_impl::namedUses_. 0f1f295 Add helper exchange_type_cast<>() template function. 02207fc Rename "version" class in the ODBC test to "odbc_version". 42549d0 Merge pull request XRPLF#297 from nbougalis/unshadow 7d5eb2d Use a base-class member instead of shadowing it. 37fbe8f Don't always disable ODBC MS SQL test under Unix, just when using Travis. ed37399 Fix ODBC backend get_affected_rows() when using FreeTDS driver. f212ca9 Skip test which fails when using ODBC with MS SQL Server. 629386f Merge pull request XRPLF#294 from denisarnaud/develop 294becb Fix for the issue XRPLF#169: cleaner way to include headers. 120b88c Accept oraocci12 as a possible Oracle library name too. 8e1ddcd Merge pull request XRPLF#213 from ayllon/develop 6552eb1 No real changes, just simplify Firebird backend code a little. 34be702 Test exact round trip for NUMERIC values for all backends. 24c0539 Fix rounding error in Firebird NUMERIC/DECIMAL conversions. 69352bc Speculatively enable exact floating point comparisons for all backends. f497fb8 Disable exact floating point when using PostgreSQL ODBC driver. 6f9dd54 No changes, just fix a repetitive typo in "assert" in comments. 02f0a69 No changes, just remove annoying "EXECEPTION" typo. 4bf2d3c Explicitly disable exact floating point comparison in MySQL test. 1f3dd92 Replace accidental assignment with a comparison in Firebird unit test. c3cd309 Make text-to-double conversion exact in PostgreSQL backend. ff9146a Explicitly disable exact floating point comparison in SQLite test. 7039d00 Compare floating point values exactly in tests whenever possible. 53cd24e Don't start implicit transaction too eagerly in Firebird backend. 66f0d82 Add possibility to build Firebird using embedded library. 1489811 Update version to 4.0.0 in cmake too. 5838cc6 Reenable building, if not testing, Oracle backend. dc4fb73 Move ORACLE_HOME to Oracle-specific script. f9167a1 Avoid many warnings about floating point values comparison. c85744b Define GCC_WARNING_SUPPRESS and GCC_WARNING_RESTORE macros. ef7e9a9 Avoid warning about set but unused variable in Oracle backend. 86a4598 Avoid g++ warnings about casting away const with C-style casts. 2c887b3 Ignore CMake-generated files. f61d7f5 Add missing include for std::max 21824a1 fixed deadlock in soci::connection_pool::try_lease 6e6bd46 Documentation for SQLite3 result code support. 97cbb0a Update PostgreSQL backend documentation for UUID type support. 5448cf1 Spelling fix in an error message: s/Commiting/Committing/. 5b073e3 Remove the unnecessary "error.h" inclusion from PostgreSQL code. 5776dd4 Introduced sqlite3_soci_error exception as subclass of soci_error. This new exception exposes the SQLite3 result code returned when any failure happens. Using this method is preferable to scrubbing string error messages in soci_error exceptions. Useful when there needs to be a distinction between general errors and database constraint errors. Unit test added to prove the funtionality does what is expected. 6d766e7 Introduced support for UUID column type in PostgreSQL statement.cpp. Unit test added for UUID column support testing all supported kinds of UUID formatted strings on input and standardized UUID formatted strings on output. e106dc0 Optionally use the environment locale in the tests. 1b65061 Make sqlite3 and mysql backends work with any locale too. 8548642 Use locale-independent function for converting doubles to strings. 1260d4f Reimplement cstring_to_double() without using C++ standard library. bc884fe Remove unused HAVE_XXX defines 4ffb21b Fix missing strtoll on Cygwin and MinGW 7bd4991 Clarify documenation and examples on bulk operations. 4d0785e Temporarily disable using Oracle backend on Travis. da7e42c Merge pull request XRPLF#242 from vadz/pgsql8-bytea 070b278 Merge branch 'fix_odbc_msvc_x86_64' of github.com:snikulov/soci into snikulov-fix_odbc_msvc_x86_64 fce8560 [travis] Disable Oracle build 0ff0e01 Replace prefix underscore with suffix in private member names 65a5ee3 Append each member of tuple/fusion instead of adding tuple/fusion 8e9fb42 Merge github.com:pacocamberos/soci into pacocamberos-branch-mysql-blob 3dca4e3 Ignore CMakeLists.txt.user created by Qt Creator IDE de7e6f0 Bump library version number to 3.2.3 946dd5a Fix PostgreSQL unit test to pass with PostgreSQL < 9.0. 0a47eaf vs2013 got strtoll/strtoull 58d31f9 Update version to 4.0.0. 89df841 Merge pull request XRPLF#239 from vadz/soci-headers-prefix 417ef5c Include all public headers using "soci/" prefix inside SOCI itself. 5a99a15 Merge pull request XRPLF#238 from vadz/cstrtod 0585bb1 Merge pull request XRPLF#237 from vadz/odbc-header-fix 6f4162c Add helper cstring_to_double() and use it in PostgreSQL backend. 73119cb Fix compilation of ODBC-specific SOCI header with new include paths. d877390 Delete obsolete src/<backend>/test directories 06a970f Revert CMake setup for ODBC DB2 test f04147a Move ODBC test DSN files to new tests location 0219c43 Fix paths to ODBC test DSN files 928174c Fix Firebird includes of private headers bc171b6 Fix copy-n-paste error in CMake macro parameter name 1f4d6ef Fix includes to point to backend headers in subdirectories 552e81c Enable other tests in tests/assert 7a018a3 Move tests/assert into separate subdirectories e2ec7ff Ignore Qt Creator and Eclipse files 5d527ec Fix windows.h case for cross-compilation 024ccc8 Firebird: fix harmless warning in 64 bit builds. 802f78e Merge pull request XRPLF#216 from dgrambow/develop 32c5f88 Add get_last_insert_id tests for sqlite3 and mysql backends ccd4c0d Add get_last_insert_id for sqlite3 and mysql backends Update docs/beyond.html accordingly 42aec23 Fix in soci::oracle to allow spaces in the params b2ea9f7 fixed link error for msvc 64 bit ef69fa9 [travis] Disable building tests due to XRPLF#199 09acb8c [travis] Fix bash script syntax error cba671f [travis] Disable ctest run due to XRPLF#199 d8f7d9d [travis] Restore soci-devel notifications 22257b3 [cmake] Remove unused log message 0cffb8a CMake 2.8.7 have problems with per target includes b430cb0 Attempt to correct -I paths for backend test 6c0721d Attempt to correct -I paths for backend folders 69d70c5 [travis] Disable tempoarily soci-devel notifications f4802f1 [travis] Log build script name 8890aea [travis] Set CMAKE_VERBOSE_MAKEFILE=ON 717c38a [travis] Remove superfluos ] from make invocation 843a43c Fix travis-ci to run CMake from root directory 9e43795 Update copyright year da025df Merge branch 'feature/125-new-layout' into develop 04a34f2 Link presentation from London C++ Meeting 11ef1fa Fix doc/index.html menu links 5393ee5 Merge branch 'hotfix/3.2.2' into develop b6d97ff Implement new source tree layout XRPLF#125 git-subtree-dir: src/soci git-subtree-split: b2855dce54340522f149221c6ebe2d14fd1129ba
1 parent 9708a12 commit caab155

File tree

386 files changed

+26249
-19103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

386 files changed

+26249
-19103
lines changed

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# General
22
*.swp
3+
*.kate-swp
34
tags
45
tmp
56

@@ -8,6 +9,16 @@ _build*
89
src/_build*
910
src/build
1011

12+
# Files generated by CMake
13+
Makefile
14+
src/core/soci_backends_config.h
15+
16+
# ... and the rest of CMake spam
17+
CMakeFiles/
18+
CMakeCache.txt
19+
CTestTestfile.cmake
20+
cmake_install.cmake
21+
1122
# Visual Studio
1223
*.opensdf
1324
*.sdf
@@ -22,3 +33,7 @@ src/build
2233
*.creator*
2334
*.files
2435
*.includes
36+
CMakeLists.txt.user
37+
38+
# Eclipse
39+
/.project

.travis.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@ services:
1414
- postgresql
1515

1616
env:
17-
matrix:
18-
- SOCI_TRAVIS_BACKEND=db2
19-
- SOCI_TRAVIS_BACKEND=empty
20-
- SOCI_TRAVIS_BACKEND=firebird
21-
- SOCI_TRAVIS_BACKEND=mysql
22-
- SOCI_TRAVIS_BACKEND=odbc
23-
- SOCI_TRAVIS_BACKEND=oracle
24-
- SOCI_TRAVIS_BACKEND=postgresql
25-
- SOCI_TRAVIS_BACKEND=sqlite3
17+
- SOCI_TRAVIS_BACKEND=db2
18+
- SOCI_TRAVIS_BACKEND=empty
19+
- SOCI_TRAVIS_BACKEND=firebird
20+
- SOCI_TRAVIS_BACKEND=mysql
21+
- SOCI_TRAVIS_BACKEND=odbc
22+
- SOCI_TRAVIS_BACKEND=oracle CFLAGS=-m32 CXXFLAGS=-m32 WITH_BOOST=OFF
23+
- SOCI_TRAVIS_BACKEND=postgresql
24+
- SOCI_TRAVIS_BACKEND=postgression
25+
- SOCI_TRAVIS_BACKEND=sqlite3
26+
27+
matrix:
28+
fast_finish: true
29+
allow_failures:
30+
- env: SOCI_TRAVIS_BACKEND=postgression
2631

2732
before_install: ./bin/ci/before_install.sh
2833
before_script: ./bin/ci/before_script.sh
@@ -32,8 +37,8 @@ notifications:
3237
email:
3338
recipients:
3439
- soci-devel@lists.sourceforge.net
35-
on_success: change # [always|never|change] # default: change
36-
on_failure: always # [always|never|change] # default: always
40+
on_success: change # [always|never|change] # default: change
41+
on_failure: always # [always|never|change] # default: always
3742

3843
irc:
3944
channels:

src/AUTHORS AUTHORS

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Viacheslav Naydenov
1919
We would like to thank you for your contributions
2020
- they allowed us to improve the quality of the SOCI library:
2121

22+
Adesmier
23+
Alex Volanis
2224
Andrey Belobrov
2325
Andrey Utkin
2426
Andriy Gapon
@@ -52,6 +54,7 @@ Matt Arsenault
5254
Matthieu Kermagoret
5355
Michael Davidsaver
5456
Mika Fischer
57+
pacocamberos
5558
Paul Bondo
5659
Petr Vanek
5760
Philip Pemberton
@@ -69,5 +72,7 @@ Tomasz Olszewski
6972
Vaclav Slavik
7073
xol
7174

72-
There are a lot of people that help to drive SOCI project forward,
73-
if we have forgot to mention someone in here, send us an email!
75+
There are a lot of people that help to drive SOCI project forward,
76+
if we have forgot to mention someone in here,
77+
if you would like to be listed by name instead of GitHub username,
78+
send us an email!

src/CHANGES CHANGES

+49-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,55 @@
11
This file contains the history of changes in the SOCI library.
22

3+
---
4+
Version 4.0.0 differs from 3.2.x in the following ways:
5+
6+
- Provide context of the failure in soci_error::what() which now returns a
7+
longer and more useful message. Use the new get_error_message() method to get
8+
just the brief error message which used to be returned by what().
9+
10+
- Firebird
11+
-- Add SOCI_FIREBIRD_EMBEDDED option to allow building with embedded library.
12+
-- Throw an exception instead of truncating too long VARCHAR columns values.
13+
14+
- ODBC/MS SQL
15+
-- Fix inserting strings of length greater than 8000 bytes into database.
16+
17+
- Oracle
18+
-- Use SQLT_BDOUBLE for floating point values instead of SQLT_FLT.
19+
20+
---
21+
Version 3.2.3 differs from 3.2.2 in the following ways:
22+
23+
- Improved Boost Tuple & Fusion integration by using boost::fusion::foreach
24+
to reference each member of a sequence. Breaks compatibility with Boost 1.35 (2008).
25+
- Fixed linker error when building 64-bit target with Visual Studio.
26+
- Fixed several issues with building using Cygwin and MinGW.
27+
- Clarified documentation and examples on bulk operations.
28+
29+
- MySQL
30+
-- Fixed building against MySQL 3.23.
31+
32+
- ODBC
33+
- Improve readability of ODBC error messages.
34+
- Fixed CMake configuration of ODBC backend for Visual Studio 64-bit targets.
35+
36+
- Oracle
37+
-- We've had to disable Oracle target in the Travis CI configuration until we
38+
figure out how to setup Oracle on Travis CI directly.
39+
Therefore, this release hasn't been extensively tested against Oracle.
40+
41+
- PostgreSQL
42+
-- Added support for UUID column type (tests and docs updated).
43+
44+
- SQLite3
45+
-- Added sqlite3_soci_error exception as subclass of soci_error to provide useful
46+
exposure of specific SQLite3 error codes (tests and docs updated).
47+
348
---
449
Version 3.2.2 differs from 3.2.1 in the following ways:
550

651
- Fixed once_temp_type destructor with noexcept(false) specifier for C++11
7-
- Fix uninitialized indicators in conversion_into_type and conversion_use_type specialisations
52+
- Fix uninitialized indicators in conversion_into_type and conversion_use_type specialisations
853
- Fixed placeholder matching for PostgreSQL-style casts with ORM
954
- Fixed memory leaking in use binding in case of bind/unbind sequence
1055
- Fixed sscanf formatter for MinGW/MSVC in backends
@@ -77,7 +122,7 @@ Version 3.2.1 differs from 3.2.0 in the following ways:
77122
---
78123
Version 3.2.0 differs from 3.1.0 in the following ways:
79124

80-
- SOCI is now organization at GitHub
125+
- SOCI is now organization at GitHub
81126
-- Git repository moved to https://github.com/SOCI/soci
82127
-- Opened new bug tracker (SF.net tracker is read-only)
83128
-- Opened Wiki for FAQ and development articles
@@ -124,7 +169,7 @@ Version 3.2.0 differs from 3.1.0 in the following ways:
124169
-- Fixed issues in binding procedure IN/OUT parameters
125170

126171
- PostgreSQL
127-
-- Add reading of BYTEA data into std::string (not fully-featured binary data support yet)
172+
-- Add reading of BYTEA data into std::string (not fully-featured binary data support yet)
128173
-- Add JSON data type support available in PostgreSQL 9.2+
129174
-- Fixed incorrect assertion in postgresql::get_error_details
130175
-- Fixed premature deallocation of prepared statements
@@ -297,7 +342,7 @@ Version 2.0.1 differs from 2.0.0 in the following ways:
297342
- A bug fix to correctly handle std::tm in the Oracle backend.
298343

299344
- A bug fix to correctly handle object relational mapping when
300-
Values::set<T>() and Values::get<T>() are called where T is a
345+
Values::set<T>() and Values::get<T>() are called where T is a
301346
TypeConversion-based type.
302347

303348
---

CMakeLists.txt

+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
###############################################################################
2+
#
3+
# This file is part of CMake configuration for SOCI library
4+
#
5+
# Copyright (C) 2009-2013 Mateusz Loskot <mateusz@loskot.net>
6+
# Distributed under the Boost Software License, Version 1.0.
7+
# (See accompanying file LICENSE_1_0.txt or copy at
8+
# http://www.boost.org/LICENSE_1_0.txt)
9+
#
10+
###############################################################################
11+
# General settings
12+
###############################################################################
13+
cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
14+
15+
project(SOCI)
16+
17+
###############################################################################
18+
# SOCI CMake modules
19+
###############################################################################
20+
21+
# Path to additional CMake modules
22+
set(CMAKE_MODULE_PATH ${SOCI_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
23+
set(CMAKE_MODULE_PATH ${SOCI_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
24+
25+
include(SociUtilities)
26+
include(SociConfig)
27+
28+
colormsg(_HIBLUE_ "Configuring SOCI:")
29+
30+
###############################################################################
31+
# SOCI version information
32+
###############################################################################
33+
include(SociVersion)
34+
35+
# The version here should be in sync with the one in include/soci/version.h.
36+
soci_version(MAJOR 4 MINOR 0 PATCH 0)
37+
38+
###############################################################################
39+
# Build features and variants
40+
##############################################################################
41+
42+
option(SOCI_SHARED "Enable build of shared libraries" ON)
43+
boost_report_value(SOCI_SHARED)
44+
45+
option(SOCI_STATIC "Enable build of static libraries" ON)
46+
boost_report_value(SOCI_STATIC)
47+
48+
option(SOCI_TESTS "Enable build of collection of SOCI tests" ON)
49+
boost_report_value(SOCI_TESTS)
50+
51+
# from SociConfig.cmake
52+
boost_report_value(SOCI_CXX_C11)
53+
54+
# Put the libaries and binaries that get built into directories at the
55+
# top of the build tree rather than in hard-to-find leaf
56+
# directories. This simplifies manual testing and the use of the build
57+
# tree rather than installed Boost libraries.
58+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
59+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
60+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
61+
62+
###############################################################################
63+
# Find SOCI dependencies
64+
###############################################################################
65+
66+
set(SOCI_CORE_TARGET)
67+
set(SOCI_CORE_TARGET_STATIC)
68+
set(SOCI_CORE_DEPS_LIBS)
69+
70+
include(SociDependencies)
71+
72+
get_property(SOCI_INCLUDE_DIRS DIRECTORY ${CMAKE_SOURCE_DIR}
73+
PROPERTY INCLUDE_DIRECTORIES)
74+
75+
if(Threads_FOUND)
76+
list(APPEND SOCI_CORE_DEPS_LIBS ${CMAKE_THREAD_LIBS_INIT})
77+
else()
78+
message(FATAL_ERROR "No thread library found")
79+
endif()
80+
81+
if(NOT MSVC)
82+
set(DL_FIND_QUIETLY TRUE)
83+
find_package(DL)
84+
if(DL_FOUND)
85+
list(APPEND SOCI_CORE_DEPS_LIBS ${DL_LIBRARY})
86+
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ${DL_INCLUDE_DIR})
87+
add_definitions(-DHAVE_DL=1)
88+
endif()
89+
else() #MSVC
90+
# This flag enables multi process compiling for Visual Studio 2005 and above
91+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
92+
endif()
93+
94+
if(Boost_FOUND)
95+
get_property(SOCI_COMPILE_DEFINITIONS
96+
DIRECTORY ${CMAKE_SOURCE_DIR}
97+
PROPERTY COMPILE_DEFINITIONS)
98+
99+
list(APPEND SOCI_COMPILE_DEFINITIONS "HAVE_BOOST=1")
100+
101+
if(Boost_DATE_TIME_FOUND)
102+
list(APPEND SOCI_CORE_DEPS_LIBS ${Boost_DATE_TIME_LIBRARY})
103+
list(APPEND SOCI_COMPILE_DEFINITIONS "HAVE_BOOST_DATE_TIME=1")
104+
endif()
105+
106+
list(APPEND SOCI_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
107+
list(APPEND SOCI_CORE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
108+
109+
set_directory_properties(PROPERTY COMPILE_DEFINITIONS "${SOCI_COMPILE_DEFINITIONS}")
110+
111+
set_property(DIRECTORY ${SOCI_SOURCE_DIR}
112+
PROPERTY COMPILE_DEFINITIONS "${SOCI_COMPILE_DEFINITIONS}")
113+
endif()
114+
115+
list(APPEND SOCI_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
116+
117+
set_property(DIRECTORY ${CMAKE_SOURCE_DIR}
118+
PROPERTY
119+
INCLUDE_DIRECTORIES ${SOCI_INCLUDE_DIRS})
120+
121+
###############################################################################
122+
# Installation
123+
###############################################################################
124+
125+
if(NOT DEFINED SOCI_LIBDIR)
126+
if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4)
127+
set(SOCI_LIBDIR "lib")
128+
else()
129+
set(SOCI_LIBDIR "lib64")
130+
endif()
131+
endif()
132+
133+
set(BINDIR "bin" CACHE PATH "The directory to install binaries into.")
134+
set(LIBDIR ${SOCI_LIBDIR} CACHE PATH "The directory to install libraries into.")
135+
set(DATADIR "share" CACHE PATH "The directory to install data files into.")
136+
set(INCLUDEDIR "include" CACHE PATH "The directory to install includes into.")
137+
138+
###############################################################################
139+
# Enable tests
140+
###############################################################################
141+
enable_testing()
142+
# Configure for testing with dashboard submissions to CDash
143+
#include(CTest) # disabled as unused
144+
145+
# Define "make check" as alias for "make test"
146+
add_custom_target(check COMMAND ctest)
147+
148+
###############################################################################
149+
# Build configured components
150+
###############################################################################
151+
include(SociBackend)
152+
153+
include_directories(${SOCI_SOURCE_DIR}/include)
154+
155+
add_subdirectory(src)
156+
add_subdirectory(tests)
157+
158+
message(STATUS "")
159+
File renamed without changes.
File renamed without changes.

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Website: http://soci.sourceforge.net
66
GitHub hosts SOCI source code repository, issues tracker and wiki:
77
https://github.com/SOCI
88

9-
Downloads and mailing lists at
9+
Downloads and mailing lists at
1010
http://sourceforge.net/projects/soci/
1111

1212
Travis CI service at https://travis-ci.org/SOCI/soci
@@ -23,18 +23,18 @@ Requirements
2323

2424
Core:
2525
* C++ compiler
26-
* Boost C++ Libraries (optional, headers only)
26+
* Boost C++ Libraries (optional, headers and Boost.DateTime)
2727

2828
Backend specific client libraries for:
2929
* DB2
3030
* Firebird
3131
* MySQL
32-
* ODBC andwith specific database driver
32+
* ODBC with specific database driver
3333
* Oracle
3434
* PostgreSQL
3535
* SQLite 3
3636

37-
See documentation at http://soci.sourceforge.net for details
37+
See documentation at http://soci.sourceforge.net for details
3838

3939
Brief History
4040
-------------

src/ideas.txt TODO

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Additional pair based val/indicator interface?
7575
Consolidate iteration methods?
7676
most radical: do we still need Statement::fetch()? into()?
7777
(Rowset<Row> can currently be used for any query, supports indicators,
78-
defaults, and no need to check for eNodata)
78+
defaults, and no need to check for eNodata)
7979

8080
---
8181
ColumnProperties() more logically belongs to Rowset than to Row
@@ -121,7 +121,7 @@ Sub-concepts:
121121
- joins are tricky
122122

123123
- boolean operators (<,>,=,<=,=> and <>) and WHERE-like clause support as a query
124-
124+
125125
rowset<Row> rs = (s.prepare << "age > 28") // rows where field 'age' is less than 28
126126
rowset<Row> rs = (s.prepare << "age <> 28") // rows where field 'age' is less or more than 28
127127
rowset<Row> rs = (s.prepare << "firstname='John' AND age > 28") // multi-fields combined queries

0 commit comments

Comments
 (0)