968 Commits

Author SHA1 Message Date
Ruben Perez 857391599e Net errors on sync fns no longer trigger assertions
close #190
2023-12-22 13:52:18 +01:00
Ruben Perez 05640cb670 Warning cleanup
Builds no longer use -pedantic
B2 builds now use -Wextra
Fixed various warnings

close #186
2023-12-21 13:54:01 +01:00
Ruben Perez bc5577ede5 Connection pool
Added any_connection and any_address
Added connection_pool and pooled_connection
Added thread_safety tests
Added defaults.hpp header

close 19
2023-12-20 18:46:31 +01:00
Ruben Perez 45e6a3b95e Removed error caused by Asio yield macros 2023-11-02 14:34:49 +01:00
Ruben Perez c35b404af7 Implementation now uses a sans-io strategy
close #179
2023-10-30 18:16:43 +01:00
Ruben Perez b6d6242e6e Removed Boost.chrono from cmake_test
close #180
boost-1.84.0.beta1 boost-1.84.0
2023-10-26 18:00:37 +02:00
Ruben Perez 0bc8554627 Upgrade to MySQL 8.1.0, MariaDB 11.1.2
Updated test database containers
Added new error codes
Fixed build problem in OSX CI
Docker images are now built automatically when they change

close #178
2023-10-11 23:15:26 +02:00
Ruben Perez f410967587 Merge branch 'master' into develop 2023-07-28 14:13:57 +02:00
Anarthal (Rubén Pérez) fbabd2c9f6 Merge pull request #172 from glywk/fix_readme
Fix typo in README.md
boost-1.83.0
2023-07-28 13:54:55 +02:00
glywk 2542d48034 Fix typography 2023-07-28 00:21:08 +02:00
Ruben Perez f00271fd6e Merge branch 'bugfix/set-time-zone-snippets' into develop 2023-07-27 11:48:25 +02:00
Ruben Perez a092f1341f Fixed syntax for SET time_zone in snippets
Close #170
2023-07-17 12:23:30 +02:00
Ruben Perez c60de9cee4 Support for reset_connection
Refactored integration tests network functions

Close #141
2023-07-14 16:27:31 +02:00
Ruben Perez cc73a0592f Fuzz testing
close #31
2023-07-07 17:22:54 +02:00
Ruben Perez 0572740ba2 Merge branch 'develop' boost-1.83.0.beta1 2023-06-24 23:54:08 +02:00
Ruben Perez 2f5f391c56 Boost 1.83 new error codes
Boost 1.83 new error codes
Error code generation now uses a CSV and a new algorithm
    to guarantee backwards compatibility

close #168
2023-06-24 23:21:12 +02:00
Ruben Perez 2dcea3f5e7 Added sanitizer builds
Fixed problem with header-only builds where
    meta_check_context didn't include its .ipp file
Fixed integer overflow problems in datetime::datetime
Fixed NULL memcpy problem in serialization_context::write
Updated tested systems in README and intro

close #33
2023-06-24 22:41:49 +02:00
Ruben Perez 00c605565d Boost 1.83 builds for latest compilers & DBs
Updated MySQL to 8.0.33
Updated MariaDB to 11.0
Added a clang 16 build
Added a clang 16 32-bit build
Added a gcc 13 build
Fixed a warning in Windows/CMake about _WINNT_VERSION not being defined

close #167
2023-06-23 20:32:05 +02:00
Ruben Perez 88fbe387ac Separate compilation
Separate compilation
Immediate completions are now posted through the I/O executor
Jamfiles now correctly requires C++11
Refactored the protocol and channel modules
Removed example on default completion tokens

close #23
close #112
2023-06-22 12:03:24 +02:00
Ruben Perez e5f6c438b5 Merge branch 'develop' 2023-05-24 12:19:00 +02:00
Ruben Perez 990b7c47cc Use Boost.Assert and Boost.ThrowException
Close #146
Close #147
2023-05-23 14:19:00 +02:00
Ruben Perez a61d4c9deb Solved race condition in integ tests under b2
Close #145
2023-05-23 14:17:59 +02:00
Ruben Perez b51115668d Added support for the static interface
Added support for the static interface
Statement execution now supports bool and optionals
Replaced the FieldLikeTuple and FieldLike concepts
    by WritableFieldTuple and WritableField
Added diagnostics::client_message
Solved a problem with blob types and stored procedures
    under MariaDB
Removed a troublesome assert in row_impl
Protected numeric_limits min/max from intrusive macros
Added C++11/14 order management examples
Documentation section collapsing
Test Jamfiles now show output only on failure

close #60
close #153
close #154
2023-05-22 14:05:12 +02:00
Ruben Perez c3af9e3a58 Removed /Zc:__cplusplus switch in MSVC
Close #139
2023-04-07 14:23:39 +02:00
Ruben Perez 0571e4b886 Generic execute and start_execution functions
Added execute, start_execution, ExecutionRequest and
    statement::bind. Deprecated query, execute_statement,
    start_query and start_statement_execution.
Statements can now be executed specifying parameters
    as iterator ranges.
Fixed a bug that caused build problems when FieldViewForwardIterator's
    reference is convertible to field_view, but not field_view.

Close #111
Close #137
Close #138
2023-04-03 16:31:33 +02:00
Anarthal (Rubén Pérez) 1743a5b9fa UB fix for row_base in debug builds
UB fix for row_base in debug builds

Close #136
boost-1.82.0
2023-04-01 11:05:22 +02:00
Ruben Perez ed007e31ae Multi-resultset
Added support for running stored procedures that SELECT data
Added support for running multiple semicolon-separated queries
Added support for running stored procedures with OUT params
Added resultset and resultset_view
Fixed documentation typos and wording
Refactored object creation in tests

Close #133
Close #132
Close #8
2023-03-31 00:44:46 +02:00
Ruben Perez 66b460572b UB fix for row_base in debug builds
Replaced unspecified behavior for pointer comparisons
    with function objects with guaranteed behavior.
Close #135
2023-03-30 23:46:05 +02:00
Ruben Perez 0f5a89b345 UB fix for row_base in debug builds
Replaced unspecified behavior for pointer comparisons
    with function objects with guaranteed behavior.
Close #135
2023-03-30 23:10:34 +02:00
Ruben Perez 3606474a50 Added ARM CIs
Added ARM docker images
Added ARM CIs for gcc and clang on Linux
Fixed a linker error on cmake when no CMAKE_CXX_STD
    is specified and the compiler defaults to C++03
ci.py now supports empty cxxstd for cmake

Close #130
Close #134
2023-03-26 23:28:46 +02:00
Ruben Perez 643e39f85e JSON and TEXT fields with binary collations support.
JSON fields are now read as strings instead of blobs.
TEXT fields with binary collations (e.g. utf8_bin or
    the JSON type in MariaDB) are now read as strings instead of blobs.
Added the column_type::json type.
The CI script now loads all data into the databases. There is no
    longer need to rebuild DB containers when test data changes.
boost-1.82.0.beta1
2023-03-04 10:21:36 +01:00
Ruben Perez 21d90d4407 Fixed UB in row and rows copy ctor self-assign
Close #124
2023-03-02 20:40:07 +01:00
Ruben Perez a477203765 row and rows correctly handle blobs now
Close #123
2023-02-25 18:14:41 +01:00
Ruben Perez 7ebea35291 General documentation fixes.
Removed the notion of "single stream read and write"
    for the notion of "single async operation"
UNIX socket examples no longer use SSL.
Added Doxygen reference template and applied it
    to all functions and classes.
Improved the overview section.
Misc corrections in discussion.
Added missing members to quickref.
Fixed usage instructions.
Fixed issue in rows that caused an unnecessary copy of the strings.
Added upgrade instructions from 0.2.x.
Added SQL injection warnings in connection::query docs.
Fixed problems with missing icons.

Close #66
Close #96
Close #78
Close #47
2023-02-24 19:26:41 +01:00
Ruben Perez 03400ba23c Database version upgrade.
Now testing with MariaDB 10.11.2
Now testing with MySQL 5.7.41
Now testing with MySQL 8.0.32
2023-02-23 19:39:08 +01:00
Ruben Perez 7794ee3385 Added doc redirection in root.
Close #122
2023-02-23 19:35:58 +01:00
Ruben Perez b63eaf761e Revert "Added a warning on the API being experimental"
This reverts commit 06357f17d1.
2023-02-21 13:34:48 +01:00
Ruben Perez 06357f17d1 Added a warning on the API being experimental 2023-02-20 13:23:56 +01:00
Ruben Perez 2738a04e24 Added a dedicate err code for "server hasn't SSL"
Added the server_doesnt_support_ssl error code.
Close #121
2023-02-20 03:00:28 +01:00
Ruben Perez 7c5c7a6cd4 Collations for MySQL and MariaDB are now independent.
The collation enum has been converted into plain integers.
Separate headers for MySQL and MariaDB collation IDs have been added.
A script to generate those headers from table dumps has been added.

Close #120
2023-02-20 02:18:44 +01:00
Ruben Perez fb87e840f0 Separate mysql and mariadb error codes.
Separate error categories for common, mysql and mariadb codes.
DB "flavor" detection.
CI mechanism to run db-specific integration tests.
Recovered PCHs in cmake and made them more sane.

close #108
2023-02-20 00:42:14 +01:00
Ruben Perez 48658b8cca Snippets are now run as tests.
Snippets are now built and executed as tests.
Added date::now and datetime::now
Renamed date::time_point_time => date::time_point
Renamed datetime::time_point_time => datetime::time_point
Added a snippet on how to work with TIMESTAMP objects

Close #106
2023-02-17 17:42:26 +01:00
Ruben Perez 527df790f8 Future-proof renames
resultset has been renamed to results, to support multi-resultset
    without changing the API.
server_diagnostics has been renamed to diagnostics, allowing
    the library to emit future client diagnostics
server_error has been renamed to error_with_diagnostics
throw_on_error semantics have been simplified
field::emplace_xxx functions have been removed (redundant)
connection::read_one_row has been removed (redundant)

close #119
2023-02-15 19:44:32 +01:00
Ruben Perez 08420ebdb9 Prepared statements are no longer I/O objects.
Prepared statements are no longer I/O objects.
Closing a statement no longer resets it.
Statements are no longer required to be kept alive
    during async execution and close.
close #118
2023-02-15 12:56:57 +01:00
Ruben Perez 7280ad6ed9 B2 CIs now runs unit tests
Fixed problem that caused build failures under GCC11/C++17
Close #117
2023-02-08 18:30:01 +01:00
Ruben Perez 4962a64a87 Added ping support.
Integration tests network variant refactor.
close #62
2023-02-06 11:55:16 +01:00
Ruben Perez e6bf59be8a Metadata strings are now read only when requested.
Added metadata_mode and the ability to not read metadata string fields.
buffer_params is now handled by connection's ctor instead of handshake.
Added CMake CI builds covering Release and MinSizeRel build types.
2023-01-21 15:47:11 +01:00
Ruben Perez 7f583f4409 Hide all internal API functions from public classes
Hide all internal API functions from public classes.
Removed operator<< for row and row_view.
Moved ssl_mode to a separate header file.
Changed metadata_collection_view to use boost::span.

Close #79
2023-01-18 12:14:31 +01:00
Ruben Perez ac7285c621 server_diagnostics and client/server error categories.
Renamed error_info to server_diagnostics.
server_diagnostics::message is now correctly treated as user-supplied input
  (security fix). Added notes on examples on this.
Split server and client errors in different categories.
Added throw_on_error.
Added connection::rebind_executor.
Made error categories public.
Exception throwing now uses Boost.Exception.
Improved error handling in examples.
Updated Asio dependencies for stackful coroutines.

Close #64
Close #107
2023-01-17 19:41:21 +01:00
Ruben Perez 6b8129d9ca CMake install test from cmake built Boost distro
CI script now deduces which Boost branch to clone
2023-01-08 12:37:25 +01:00