Commit Graph

119 Commits

Author SHA1 Message Date
Vadim Zeitlin d202e0d846 Initialize indicator to i_null even when there is no data at all
It is unexpected and error-prone to leave the indicator uninitialized if
a query doesn't retrieve any data, as it's too easy to forget to check
for got_data() and have the code working unpredictably depending on the
initial value of the uninitialized variable.

So always initialize the indicator value to i_null, this can't do any
harm, avoids bugs due to not checking got_data() and makes the code
simpler in the common case when absence of data is the same as having
NULL value in the database.

See #28, #856.
2021-03-12 02:20:26 +01:00
nobodyxu d867b0c631 Use ELF visibility
Only make symbols that are part of the public API visible.

Closes #848.
2021-01-15 13:46:27 +01:00
Vadim Zeitlin 931b8fc728 Document SOCI_ASAN and SOCI_LTO build options
Try to keep all CMake options documented.
2020-12-27 13:51:02 +01:00
Vadim Zeitlin d4d50d6500 Don't show interactive ODBC dialogs when reconnecting
Such dialogs can be unexpected and confusing, as reconnection can happen
automatically, and not in a response to a user action.

Implement this by adding a new "reconnect" option and add is_option_on()
helper to connection_parameters to facilitate using it.
2020-11-04 01:30:05 +01:00
Vadim Zeitlin 1a02665e21 Update version to 4.0.1
Prepare for v4.0.1 release.
2020-10-19 16:08:28 +02:00
Vadim Zeitlin 43c133be13 Add session::is_connected() function
This function can be used to check if the connection to the server is
still available (and then, perhaps, call reconnect(), if it isn't).

Implement it for all backends using native API (except for SQLite for
which it always returns true).
2020-10-13 01:05:51 +02:00
Johan Pascal c158d2c67b Support "vfs" flag in SQLite3 backend connection parameters
Allow passing a pre-registered sqlite3 vfs string identifier to the
database open function
2020-06-17 23:54:01 +02:00
Vadim Zeitlin 478671a813 Fix spelling of "overridden" in indicators documentation 2020-04-04 23:32:20 +02:00
Cavaler d6edfe5868 Support "readonly" flag in SQLite3 backend connection parameters
Allow opening the database in read-only mode instead of the default
read-write one.

See #784.
2020-02-06 14:19:33 +01:00
tt4g 4c4eb3d8df Fix links to MySQL documenation (#765) 2019-11-03 21:14:34 +01:00
Mateusz Łoskot 8164017540 Fix MkDocs warnings about missing pages. Tidy up. 2019-10-25 22:37:06 +02:00
Mateusz Łoskot d581cf49e4 Set CMAKE_CXX_STANDARD with interaction with SOCI_CXX11 (#758)
Add minimal Travis CI job with CMAKE_CXX_STANDARD=11.

Closes #752
2019-10-02 11:13:50 +02:00
Mateusz Łoskot 02a5cae2c5 Rename SOCI_CXX_C11 to SOCI_CXX11 (#757)
This change was discussed and suggested in this thread of comments:
https://github.com/SOCI/soci/pull/755#discussion_r329550806
2019-09-30 20:58:57 +02:00
Mateusz Łoskot 560cdeb16c Document POSTGRESQL_LIBRARY is user-defined path to client library [skip ci]
POSTGRESQL_LIBRARY is input variable while POSTGRESQL_LIBRARIES
is variable set by the Find-module.

Waning: This is known issue of Find-modules in SOCI distribution that
they are not unified regarding FOO_LIBRARIES vs FOO_LIBRARY naming.
Most accept or expect FOO_LIBRARIES as input variable.
This should be improved in future, once CMake scripts are modernised
and switched to CMake 3 best practices.

Fixes #702
2019-09-24 21:35:14 +02:00
Mateusz Łoskot ee6a4e7d63 Fix markdownlint error about indented code block
docs/backends/firebird.md: 96:
  MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
2019-09-21 13:40:10 +02:00
Mohan Sella 9d0caa13ca Use 64-bit integer for next sequence and last insert ID values (#720) 2019-06-07 15:00:07 +02:00
tt4g c15b178a44 Update document for SOCI_SHARED (#718) [ci skip] 2019-03-21 09:24:22 +01:00
mohansella 9a320a3443 Fix typo in CMake URL (#715) 2019-02-23 16:48:26 +00:00
tt4g 0ab5205f89 Fix sqlite3 CMake variable names in installation.md (#710) 2019-02-17 14:50:03 +00:00
Tomay 02a45a53a6 Fix firebird native api access documentation reference (#709) 2019-02-02 16:33:37 +00:00
Tomay f5751c0100 Fix ODBC native api access documentation reference (#708) 2019-02-02 15:49:11 +00:00
Tomay 6e905d5efb Fix firebird data types documentation reference (#707) 2019-01-29 20:49:59 +00:00
Tomay 2d512936ea Fix some code sample typos (#705) 2019-01-17 16:06:29 +01:00
Tomay 554ec46741 Fix a code example typo (#704) 2019-01-17 11:40:04 +01:00
Tomay ac3aa20d23 Fix a typo (#703)
anwer -> answer
2019-01-14 19:44:06 +01:00
Takatoshi Kondo 2bc88222bf Add mysql timeout support (#691)
* Add mysql timeout support.
* Added documents for timeouts.
2018-11-18 10:11:59 +01:00
Astrinus 3a1f602b30 Fix CircleCI error on wrong indentation (#662) 2018-06-20 22:23:34 +02:00
Heiko Rabe d83f5c131b Update ODBC backend doc, specify odbc variant 2018-06-10 21:24:57 +02:00
Heiko Rabe 0914287ce2 Update backend docs, add successful tested platform 2018-06-10 21:19:13 +02:00
Mateusz Loskot edb87abd8e Remove use of std::unary_function
Deprecated in C++11 and removed in C++17

Fixes #646
2018-06-08 00:06:56 +02:00
Mateusz Loskot ec68b3bf73 [docs] Fix markdownlint error MD012
MD012: no-multiple-blanks Multiple consecutive blank lines
2018-02-26 22:18:10 +01:00
Mateusz Loskot 95e4633a5f Drop support for PostgreSQL 7.x
Remove uses of CMake opions and related #define-s
  SOCI_POSTGRESQL_NOPREPARE
  SOCI_POSTGRESQL_NOPARAMS
  SOCI_POSTGRESQL_NOBINDBYNAME.

Closes #122
2018-02-26 18:09:33 +01:00
Vadim Zeitlin bd6bc40c0b Document logging with session::set_logger()
Add description of the more flexible logging mechanism also available
now, in addition to basic logging.
2018-02-24 15:54:06 +01:00
Mateusz Loskot 6bfa674aec Fix typo in SOCI_POSTGRESQL_NOSINLGEROWMODE option/macro name
How this has slipped through a few pair of reviewing eyes ;-)
Corrects changes added in #571 and #594
2018-02-22 23:06:39 +01:00
Mateusz Loskot 0bf1b87110 [doc] Document SOCI_CXX_C11 option 2018-02-12 21:24:48 +01:00
mitant ff3809664e Fix typo 2018-01-18 23:14:37 -05:00
Astrinus efbc6c905f Fixed broken links in ada/reference.md 2017-12-20 17:00:32 +01:00
Astrinus 66301072e3 Fixed broken links in client.md 2017-12-20 16:54:43 +01:00
Astrinus 6cb7a83555 Corrected table and added links to backends
DB2 column was missing.
2017-12-20 16:47:23 +01:00
Astrinus 549e9496d5 Fixed typo and broken link in multithreading.md 2017-12-20 16:04:36 +01:00
Astrinus 6eb048a62a Added missing parenthesis and fixed typo 2017-12-20 16:02:00 +01:00
Astrinus 34512ffad3 Fixed broken links in sqlite3.md 2017-12-20 16:00:22 +01:00
Astrinus 187ae38526 Fixed broken links and typos 2017-12-20 15:37:20 +01:00
Astrinus 38260d89e1 Fixed some typos in oracle.md 2017-12-20 14:46:50 +01:00
Astrinus a686980036 Fixed broken links and a typo in oracle.md 2017-12-20 14:45:00 +01:00
Astrinus 17ec478281 Fixed broken links on odbc.md 2017-12-20 14:40:16 +01:00
Astrinus 437871dd41 Fixed broken links and some typos on mysql.md 2017-12-20 14:37:31 +01:00
Astrinus 09cb2f0a69 Refix BLOB link in firebird.md 2017-12-20 11:30:25 +01:00
Astrinus 52d006dac8 Fix broken links in firebird.md 2017-12-20 11:28:53 +01:00
Astrinus 3ccdd69bcb Fixed broken link in interfaces.md 2017-12-20 11:16:25 +01:00