Skip to content

Commit 6d08247

Browse files
authored
Migrate docs to pydocca
Improved reference docs linkage and fixed several formatting issues Removed obsolete performance warning about close_statement close #334
1 parent 20335ac commit 6d08247

24 files changed

+3530
-1820
lines changed

.drone.star

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77

88
_triggers = { "branch": [ "master", "develop" ] }
9-
_container_tag = '1e06ba22fc5ab038a3c4ce4a73d0d624848c8f70'
9+
_container_tag = 'ee78aa84c0231742deb853556da1d56f5a2b8148'
1010
_win_container_tag = 'e7bd656c3515263f9b3c69a2d73d045f6a0fed72'
1111

1212

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
coverage:
1919
runs-on: ubuntu-latest
2020
container:
21-
image: ghcr.io/anarthal-containers/build-gcc13:1e06ba22fc5ab038a3c4ce4a73d0d624848c8f70
21+
image: ghcr.io/anarthal-containers/build-gcc13:ee78aa84c0231742deb853556da1d56f5a2b8148
2222
volumes:
2323
- /var/run/mysqld:/var/run/mysqld
2424
services:
2525
mysql:
26-
image: ghcr.io/anarthal-containers/ci-db:mysql-8.4.1-1e06ba22fc5ab038a3c4ce4a73d0d624848c8f70
26+
image: ghcr.io/anarthal-containers/ci-db:mysql-8.4.1-ee78aa84c0231742deb853556da1d56f5a2b8148
2727
ports:
2828
- 3306:3306
2929
volumes:

.github/workflows/fuzz.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
fuzz:
2121
runs-on: ubuntu-latest
2222
container:
23-
image: ghcr.io/anarthal-containers/build-clang18:1e06ba22fc5ab038a3c4ce4a73d0d624848c8f70
23+
image: ghcr.io/anarthal-containers/build-clang18:ee78aa84c0231742deb853556da1d56f5a2b8148
2424
volumes:
2525
- /var/run/mysqld:/var/run/mysqld
2626
services:
2727
mysql:
28-
image: ghcr.io/anarthal-containers/ci-db:mysql-8.4.1-1e06ba22fc5ab038a3c4ce4a73d0d624848c8f70
28+
image: ghcr.io/anarthal-containers/ci-db:mysql-8.4.1-ee78aa84c0231742deb853556da1d56f5a2b8148
2929
ports:
3030
- 3306:3306
3131
volumes:

doc/Jamfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ project mysql/doc ;
1010

1111
import boostbook ;
1212
import os ;
13+
import path ;
1314
import-search /boost/docca ;
1415
import docca ;
1516

@@ -26,9 +27,11 @@ local doxygen_exclussions =
2627
src.hpp
2728
;
2829

29-
docca.reference reference.qbk
30+
local include-prefix = [ path.root $(__file__:D) [ path.pwd ] ] ;
31+
include-prefix = [ path.native $(include-prefix:D)/include ] ;
32+
33+
docca.pyreference reference.qbk
3034
:
31-
xsl/custom-overrides.xsl
3235
[ glob-tree-ex ../include/boost/mysql : *.hpp : $(doxygen_exclussions) ]
3336
:
3437
<doxygen:param>PROJECT_NAME=MySQL
@@ -38,6 +41,7 @@ docca.reference reference.qbk
3841
<doxygen:param>MACRO_EXPANSION=YES
3942
<doxygen:param>EXPAND_ONLY_PREDEF=YES
4043
<doxygen:param>SEARCH_INCLUDES=NO
44+
<doxygen:param>STRIP_FROM_PATH=$(include-prefix)
4145
<doxygen:param>"PREDEFINED=\\
4246
BOOST_MYSQL_DOXYGEN \\
4347
__cpp_lib_string_view \\
@@ -75,7 +79,6 @@ docca.reference reference.qbk
7579
<doxygen:param>SKIP_FUNCTION_MACROS=NO
7680
<doxygen:param>OUTPUT_LANGUAGE=English
7781
<doxygen:param>ABBREVIATE_BRIEF=
78-
<doxygen:param>INLINE_INHERITED_MEMB=YES
7982
<doxygen:param>AUTOLINK_SUPPORT=NO
8083
<doxygen:param>EXTRACT_ALL=NO
8184
<doxygen:param>EXTRACT_PRIVATE=NO
@@ -91,8 +94,9 @@ docca.reference reference.qbk
9194
<doxygen:param>SHOW_USED_FILES=NO
9295
<doxygen:param>SHOW_FILES=NO
9396
<doxygen:param>SHOW_NAMESPACES=NO
94-
<doxygen:param>CLASS_DIAGRAMS=NO
9597
<doxygen:param>QUIET=YES
98+
99+
<docca:config>config.json
96100
;
97101

98102
install images

doc/config.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"include_private": false,
3+
"legacy_behavior": false,
4+
"external_marker": "!EXTERNAL!",
5+
"link_prefix": "mysql.ref.",
6+
"default_namespace": "boost::mysql",
7+
"convenience_header": "boost/mysql.hpp",
8+
"replace_strings": {
9+
"__see_below__": "``['see-below]``",
10+
"\\bclass CompletionToken\\b": "class __CompletionToken__",
11+
"\\bclass ExecutionContext\\b": "class __ExecutionContext__",
12+
"\\bclass ExecutionRequest\\b": "class __ExecutionRequest__",
13+
"\\bclass ExecutionStateType\\b": "class __ExecutionStateType__",
14+
"\\bclass Executor\\b": "class __Executor__",
15+
"\\bclass FieldViewFwdIterator\\b": "class __FieldViewFwdIterator__",
16+
"\\bclass Formattable\\b": "class __Formattable__",
17+
"\\bclass OutputString\\b": "class __OutputString__",
18+
"\\bclass ResultsType\\b": "class __ResultsType__",
19+
"\\bclass SocketStream\\b": "class __SocketStream__",
20+
"\\bclass StaticRow\\b": "class __StaticRow__",
21+
"\\bclass Stream\\b": "class __Stream__",
22+
"\\bclass WritableField\\b": "class __WritableField__",
23+
"\\bclass WritableFieldTuple\\b": "class __WritableFieldTuple__",
24+
"\\bBOOST_MYSQL_FORMATTABLE\\b": "class"
25+
}
26+
}

doc/qbk/23_sql_formatting_advanced.qbk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ You don't have to use exceptions, though. [reflink basic_format_context] and
107107
instead.
108108

109109
[reflink basic_format_context] contains an error code that is set when formatting
110-
a value fails. This is called the ['error state], and can be queried using [refmem basic_format_context error_state].
110+
a value fails. This is called the ['error state], and can be queried using [refmem format_context_base error_state].
111111
When [refmem basic_format_context get] is called (after all individual values have been formatted),
112112
the error state is checked. The `system::result` returned by `get` will contain the error
113113
state if it was set, or the generated query if it was not:

doc/xsl/custom-overrides.xsl

Lines changed: 0 additions & 35 deletions
This file was deleted.

include/boost/mysql/any_address.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ enum class address_type
3232
* \brief (EXPERIMENTAL) A host and port identifying how to connect to a MySQL server.
3333
* \details
3434
* This is an owning type with value semantics.
35-
* \see any_address
3635
*
3736
* \par Experimental
3837
* This part of the API is experimental, and may change in successive
@@ -58,7 +57,6 @@ struct host_and_port
5857
* This type is defined in all systems, regardless of their UNIX socket support.
5958
* \n
6059
* This is an owning type with value semantics.
61-
* \see any_address
6260
*/
6361
struct unix_path
6462
{

include/boost/mysql/character_set.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ struct character_set
4949
* trying to interpret the first character, it should return 0 to signal the error.
5050
* \n
5151
* This function must not throw exceptions or have side effects.
52-
* \n
53-
* \par Function signature
54-
* The function signature should be:
55-
* `std::size_t (*next_char)(boost::span<const unsigned char> r)`.
5652
*/
5753
std::size_t (*next_char)(span<const unsigned char>);
5854
};

include/boost/mysql/client_errc.hpp

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,25 @@ namespace mysql {
2323
*/
2424
enum class client_errc : int
2525
{
26-
/// An incomplete message was received from the server (indicates a deserialization error or
27-
/// packet mismatch).
26+
/**
27+
* \brief An incomplete message was received from the server (indicates a deserialization error or
28+
* packet mismatch).
29+
*/
2830
incomplete_message = 1,
2931

30-
/// An unexpected value was found in a server-received message (indicates a deserialization
31-
/// error or packet mismatch).
32+
/**
33+
* \brief An unexpected value was found in a server-received message (indicates a deserialization
34+
* error or packet mismatch).
35+
*/
3236
protocol_value_error,
3337

3438
/// The server does not support the minimum required capabilities to establish the connection.
3539
server_unsupported,
3640

37-
/// Unexpected extra bytes at the end of a message were received (indicates a deserialization
38-
/// error or packet mismatch).
41+
/**
42+
* \brief Unexpected extra bytes at the end of a message were received (indicates a deserialization
43+
* error or packet mismatch).
44+
*/
3945
extra_bytes,
4046

4147
/// Mismatched sequence numbers (usually caused by a packet mismatch).
@@ -47,22 +53,29 @@ enum class client_errc : int
4753
/// The authentication plugin requires the connection to use SSL.
4854
auth_plugin_requires_ssl,
4955

50-
/// The number of parameters passed to the prepared statement does not match the number of
51-
/// actual parameters.
56+
/**
57+
* \brief The number of parameters passed to the prepared statement does not match the number of
58+
* actual parameters.
59+
*/
5260
wrong_num_params,
5361

5462
/// The connection mandates SSL, but the server doesn't accept SSL connections.
5563
server_doesnt_support_ssl,
5664

57-
/// The static interface detected a mismatch between your C++ type definitions and what the server
58-
/// returned in the query.
65+
/**
66+
* \brief
67+
* The static interface detected a mismatch between your C++ type definitions and what the server
68+
* returned in the query.
69+
*/
5970
metadata_check_failed,
6071

61-
/// The static interface detected a mismatch between the number of row types passed to `static_results`
62-
/// or `static_execution_state` and the number of resultsets returned by your query.
72+
/**
73+
* \brief The static interface detected a mismatch between the number of row types passed to
74+
* \ref static_results or \ref static_execution_state and the number of resultsets returned by your query.
75+
*/
6376
num_resultsets_mismatch,
6477

65-
/// The StaticRow type passed to read_some_rows does not correspond to the resultset type being read.
78+
/// The `StaticRow` type passed to read_some_rows does not correspond to the resultset type being read.
6679
row_type_mismatch,
6780

6881
/// The static interface encountered an error when parsing a field into a C++ data structure.
@@ -74,8 +87,10 @@ enum class client_errc : int
7487
/// (EXPERIMENTAL) An operation controlled by Boost.MySQL was cancelled.
7588
cancelled,
7689

77-
/// (EXPERIMENTAL) Getting a connection from a connection_pool failed because the
78-
/// pool is not running. Ensure that you're calling connection_pool::async_run.
90+
/**
91+
* \brief (EXPERIMENTAL) Getting a connection from a connection_pool failed because the
92+
* pool is not running. Ensure that you're calling connection_pool::async_run.
93+
*/
7994
pool_not_running,
8095

8196
/// (EXPERIMENTAL) An invalid byte sequence was found while trying to decode a string.
@@ -87,8 +102,10 @@ enum class client_errc : int
87102
/// (EXPERIMENTAL) A format string containing invalid syntax was provided to a SQL formatting function.
88103
format_string_invalid_syntax,
89104

90-
/// (EXPERIMENTAL) A format string with an invalid byte sequence was provided to a SQL formatting
91-
/// function.
105+
/**
106+
* \brief (EXPERIMENTAL) A format string with an invalid byte sequence was provided to a SQL formatting
107+
* function.
108+
*/
92109
format_string_invalid_encoding,
93110

94111
/// (EXPERIMENTAL) A format string mixes manual (e.g. {0}) and automatic (e.g. {}) indexing.
@@ -97,16 +114,23 @@ enum class client_errc : int
97114
/// (EXPERIMENTAL) The supplied format specifier (e.g. {:i}) is not supported by the type being formatted.
98115
format_string_invalid_specifier,
99116

100-
/// (EXPERIMENTAL) A format argument referenced by a format string was not found. Check the number
101-
/// of format arguments passed and their names.
117+
/**
118+
* \brief (EXPERIMENTAL) A format argument referenced by a format string was not found. Check the number
119+
* of format arguments passed and their names.
120+
*/
102121
format_arg_not_found,
103122

104-
/// (EXPERIMENTAL) The character set used by the connection is not known by the client. Use
105-
/// set_character_set or async_set_character_set before invoking operations that require a known charset.
123+
/**
124+
* \brief (EXPERIMENTAL) The character set used by the connection is not known by the client. Use
125+
* \ref any_connection::set_character_set or \ref any_connection::async_set_character_set
126+
* before invoking operations that require a known charset.
127+
*/
106128
unknown_character_set,
107129

108-
/// (EXPERIMENTAL) An operation attempted to read or write a packet larger than the maximum buffer size.
109-
/// Try increasing \ref any_connection_params::max_buffer_size.
130+
/**
131+
* \brief (EXPERIMENTAL) An operation attempted to read or write a packet larger than the maximum buffer
132+
* size. Try increasing \ref any_connection_params::max_buffer_size.
133+
*/
110134
max_buffer_size_exceeded,
111135
};
112136

0 commit comments

Comments
 (0)