62 Commits

Author SHA1 Message Date
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
a092f1341f Fixed syntax for SET time_zone in snippets
Close #170
2023-07-17 12:23:30 +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
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
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
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
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
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
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
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
7c4de363bb CMake version & OpenSSL degradation
The integrated CMake Boost build won't fail if OpenSSL is not found
The integrated CMake Boost build now requires cmake 3.5
2023-01-01 22:21:11 +01:00
Ruben Perez
31bc3b9dac Copyright year bump 2022-12-31 16:28:59 +01:00
Ruben Perez
a975273490 Multi-function operations
Added proper support for multi-function operations, segregating
  the API in single-function and multi-function operations.
  Removed resultset as I/O object, the read_xxx owning functions
  and read_all.
Unit test infrastructure for async testing.
Reference types lifetime fixes.
Removed connection::valid.
Fixed a serialization bug for statements with no parameters.
Binary protocol strings now use the type recommended by MySQL.
Refactored Jamfile to match best practices.
Updated description in libraries.json.

Close #82
Close #81
Close #73
Close #59
Close #58
Close #53
Close #41
Close #22
2022-12-31 15:49:09 +01:00
Ruben Perez
f662df3635 Boostification, part 1
Proper cmake support
New UNIX B2 builds
New UNIX CMake builds
Removed appveyor support
New Windows B2 drone builds
2022-11-28 17:29:56 +01:00
Ruben Perez
486bddc8ef Renamed qbks to include ordering 2022-11-04 19:08:07 +01:00
Ruben Perez
e9febc08f7 use_views 2022-11-02 15:30:05 +01:00
Ruben Perez
b48ca483d5 field_type 0> column_type 2022-11-02 14:39:08 +01:00
Ruben Perez
156df766ef Metadata docs 2022-11-02 14:26:55 +01:00
Ruben Perez
7b3b10385e Statement tuple execute 2022-10-28 13:45:13 +02:00
Ruben Perez
f2588a7a50 Tutorial fixes 2022-10-24 18:29:40 +02:00
Ruben Perez
0984ce414f Jamfile restructuring 2022-10-23 20:33:41 +02:00
Ruben Perez
1040c20f19 Unified with cmake 2022-10-21 20:23:16 +02:00
Ruben Perez
f4fa553774 Basic Jamfiles 2022-10-21 19:49:51 +02:00
Ruben Perez
9fe98dd83b Reovered example value (field) 2022-10-20 11:35:57 +02:00
Ruben Perez
6164b878e6 read_one now returns a bool 2022-10-20 11:30:37 +02:00
Ruben Perez
13da139cdd Examples 2022-10-19 22:42:12 +02:00
Ruben Perez
996172dc3a Include file normalization 2022-10-11 12:19:18 +02:00
Ruben Perez
50cd20bb7d Field view 2022-08-08 17:04:50 +02:00
Ruben Perez
373af6a087 Fixed bug in timeouts example 2022-07-10 18:32:29 +02:00
Ruben Perez
13d3615464 Example and docs on timeouts and cancellations 2022-03-30 15:54:58 +02:00
Ruben Perez
cfdfdadb69 Integration tests are now run only on demand 2022-03-29 22:55:21 +02:00
Ruben Perez
86e0eacd6a SSL/TLS and row reading rework (v0.2.0)
* SSL/TLS rework
* Unified connection object
* New prepared_statement::execute interface
* New resultset::read_one mechanic
* Unified row object
* null_t type
* Travis to GitHub actions migration
* Integration test rework
2022-03-21 16:09:48 +01:00
Ruben Perez
fa6f177e0f Added support for the BIT type
- Moved socket_connection to a separate include file.
- Clarified Stream requirements.
- Made make_error_code public.
- Updated include styles to match Boost's.
- Moved <boost/myql/mysql.hpp> to <boost/mysql.hpp> to match
conventions.
- Added support for the BIT type.

closes #13
closes #21
2021-03-08 18:56:25 +01:00
Ruben Perez
1ad31e7a6b TLS cert validation, valid() after moves and others
- Added connection::connection overload accepting a user-defined SSL
context.
- Added SSL certificate validation example.
- Removed ssl_options.
- Fixed an incorrect constexpr implementation
(value::is_convertible_to).
- Made I/O objects' valid() behavior after move operations more uniform.
- Changed exception type thrown by value::get to a custom one defined in
Boost.Mysql.
- Changed docs link in README.

closes #39
closes #27
closes #25
closes #10
2021-03-07 19:41:44 +01:00
Ruben Perez
ade68d172d Added support for relational operators in value
Replaced std::nullptr_t for boost::variant2::monostate in values
Added support for relational operators in value
Automatic docs generation

closes #48
closes #46
2021-03-06 16:35:15 +01:00
Ruben Perez
087faf187a Added execute_params
- Added execute_params
- prepared_statement::execute with iterators overload has been replaced by
execute_params overload
- Added type requirement checks for ValueForwardIterator and
ValueCollection
2021-02-28 22:05:31 +01:00
Ruben Perez
4c7ca0a1b4 Row reading reworks
- Removed distinction between row and owning_row
- Changed semantics for fetch_one to row& + bool
- Renamed all fetch_* fns to read_*
- Added row.clear()
2021-02-28 22:03:28 +01:00
Ruben Perez
dd2447c6cb Updated Boost version to 1.75.0
commit 5d0dafa324453ce731ddd2a427fa68490843b6c6
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 20 18:52:52 2020 +0100

    Added missing test exlussion on Windows

commit 52f1ce1eb6f43478451ee1c9761efa9a1f0c85bf
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 20 18:05:47 2020 +0100

    Trying to fix PS syntax errors 2

commit d680a874b069b8cc6c7965b226cda02f49438206
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 20 17:58:30 2020 +0100

    Fixing PS syntax errors

commit 84915ac269714fcfbfc6dc9e6ce10aefa395d33a
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 20 17:52:14 2020 +0100

    Changed Windows CMake builds to use latest Boost

commit 75aa757ae50f9c9d31cdb8018cf14e1dea5e6530
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 20 16:07:25 2020 +0100

    Removed conflictive build config under Windows

commit 7cd77f9204b842999233f8c6782caa3fbbf15a89
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Mon Dec 14 20:09:23 2020 +0100

    Desperate try to fix MSVC internal errors 2

commit f81de256735b1a705d03a7994cfecbce1a7581d4
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 13 20:44:59 2020 +0100

    Desperate try to fix stuff

commit 3a8f8d1caf8e8d906a7d96ba7edf62f2e3b09651
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 13 18:48:33 2020 +0100

    Reverted to using env var

commit 420427989274036fd04351531bdae2ebde621f5f
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 13 16:55:17 2020 +0100

    Changed CMake way of excluding tests to match b2's

commit 1db13f9e3df346135dadb1c2686ecafc0fe6c2df
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 13 16:33:05 2020 +0100

    Updated B2 CIs to explicitly run certain tests

commit 12700b387beb99f2ac1cf342291bc63f49d26a99
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 13 16:14:47 2020 +0100

    Updated test selection (sha256/unix) in b2

commit 0f23bddeb64203e5c570280e5e1de4a5ae083f94
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 13 16:14:34 2020 +0100

    Added internal script to setup b2 env

commit 13cf6b102b0d71f5496bcd433e3269ea297a9f26
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Dec 13 14:00:30 2020 +0100

    Added option to skip UNIX socket tests (only cmake)

commit a35f668ae0a968ef01eb6517d9de86c45e07dceb
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sat Dec 12 21:38:06 2020 +0100

    Attempted to correct test filter problem

commit 29282e5a4fa6e4f5b7c5de56662b9cbea7758e06
Author: anarthal <rubenperez038@gmail.com>
Date:   Sat Dec 12 11:27:53 2020 -0800

    Fixes to build in MSVC

commit bc8599358435de946cba10cc7cbdc264bb793e5b
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sat Dec 5 13:57:56 2020 +0100

    Reduced concurrency on Unix cmake builds

commit 3e183277cb2b3c4480ec102f956a4683811d3f44
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Fri Dec 4 17:50:31 2020 +0100

    Test ssh keys

commit d91a4ebdb65444da1c5952444c571dc68de1cd7b
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Nov 29 19:59:07 2020 +0100

    Remove TODO.txt in favor of GitHub issues

commit fbe5e58966304b6fd87029af4657e6ed1aa2f2fd
Author: Ruben Perez <rubenperez038@gmail.com>
Date:   Sun Nov 29 19:58:25 2020 +0100

    Updated to build with 1.75
2020-12-20 21:20:23 +01:00
ruben
5ba63a8459 Migrated docs to quickbook 2020-07-06 17:56:04 +01:00
ruben
591671bd8d Lowered std requirement to C++11 2020-06-18 22:54:01 +01:00
ruben
3407d818f6 Added support for Boost.Build 2020-06-12 23:44:30 +01:00
ruben
9bba29e483 Added CMake target exports and install rules 2020-06-04 15:57:31 +01:00
ruben
cf2fd03926 Added support for default completion tokens 2020-06-02 12:16:13 +01:00
Richard Hodges
3c420b8683 Added support for use_awaitable
Co-authored-by: ruben <rubenperez038@gmail.com>
Co-authored-by: Alex Hodges <alexander.hodges11@live.co.uk>
2020-06-02 12:11:48 +01:00
ruben
3e10845104 Made value a proper class 2020-05-16 17:30:30 +01:00
ruben
42a921d055 Added connection::connect 2020-04-24 11:54:54 +01:00
ruben
20641b5937 Added connection close to examples 2020-04-22 13:45:18 +01:00