19 Commits

Author SHA1 Message Date
Vadim Zeitlin
e41ad80743 Add get_next_sequence_values() for getting many values at once
This is much more efficient than calling get_next_sequence_value() many
times in a loop.

Implement it in PostgreSQL and Oracle backends.
2026-08-15 00:56:50 +02:00
Vadim Zeitlin
3d058676d8 Add session::get_database_engine()
The use of this function is discouraged but it may sometimes be
necessary and get_backend_name() is insufficient to determine the
database being used because ODBC backend can be used with any of them.
2026-06-24 17:04:16 +02:00
Vadim Zeitlin
f7a1a05913 Use nullptr instead of NULL or 0
Run clang-tidy modernize-use-nullptr check on all files and manually
change the remaining NULLs skipped by it to nullptr.

Also use nullptr in the documentation.
2026-01-14 14:24:39 +01:00
Vadim Zeitlin
40424b81b1 Don't terminate the application on errors during disconnection
Make sure no exceptions can escape from session class dtor as this would
result in an immediate application termination due to throwing from a
(implicitly) noexcept function.

Let exceptions escape from the backend session classes dtors for those
of them that throw from them: as these classes are private, this
shouldn't affect any existing code and allows these exceptions to still
be reported if they happen when session::close() is called.

Also document that close() may throw and should be called by the
application if handling errors during clean up is important for it.

Closes #1313.
2025-11-13 20:37:20 +01:00
Vadim Zeitlin
e55d36310a Fix spelling mistakes and typos in the documentation
Pass all the Markdown files through aspell.
2025-09-19 15:21:44 +02:00
Vadim Zeitlin
ee72345f6e Merge branch 'wstring'
Add std::wstring support for ODBC backend.

See #1179.
2025-01-24 16:45:11 +01:00
Robert Adam
dc4815cac1 Implement session::get_last_query_with_context()
Allow retrieving the last query with the parameter values used for them.

See #678.

Closes #1027.

Closes #1164.
2025-01-24 16:24:59 +01:00
Benjamin Oldenburg
982434f170 Add std::wstring support for ODBC backend
Handle wide-strings similarly to how normal strings are already handled.

For now support for them is only available in the ODBC backend.

Also add conversion functions between UTF-{8,16,32} and wchar_t and the
tests for them. Note that some of these functions are not used yet, but
provide the complete set as they probably will be in the future.

Co-Authored-By: Vadim Zeitlin <vz-soci@zeitlins.org>
2024-11-17 16:49:25 +01:00
Vadim Zeitlin
fdfcc12e8d Remove data_type argument from describe_column() backend function
This is unnecessary as it can be recovered from db_type: even if this is
not lossless, we don't really care about it if all we need is data_type,
so simplify the API and the implementation by only having one "type"
parameter instead of two.

No real changes.
2024-01-03 00:36:54 +01:00
Vadim Zeitlin
cd738b0af8 Document db_type first, then data_types
Make sure to list db_type first, before the now deprecated data_type.
2024-01-02 23:45:46 +01:00
Lukas Zanner
037a332ca7 Add db_type description to docs 2023-10-18 22:28:19 +02:00
Lukas Zanner
ff90687f2f Add back removed dt_* and x_* types
Types that refered to non-fixed-size types have been replaced in favor
of their fixed-size types (e.g. dt_integer -> dt_int32, x_short ->
x_int16). To be backwards compatible, we need to keep all of the
previous types though.
2023-08-13 17:25:29 +02:00
Lukas Zanner
d4414a3edb Update docs for complete integer type support 2023-08-13 17:25:28 +02: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
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
Mohan Sella
9d0caa13ca Use 64-bit integer for next sequence and last insert ID values (#720) 2019-06-07 15:00:07 +02:00
Astrinus
66301072e3 Fixed broken links in client.md 2017-12-20 16:54:43 +01:00
Mateusz Loskot
46071f5f64 [docs] Replace HTML tables with Markdown tables
Use fenced code blocks with language specification.
Update database/os/compiler tables for some backends.
2017-09-23 18:14:47 +02:00
Mateusz Loskot
80941a9d97 Update structure of SOCI 4.0.0 documentation
Add MkDocs configuration to build documentation pages.

[ci skip]
2017-08-07 00:45:23 +02:00