Skip to content

Commit c11b00d

Browse files
committed
docs: Rename XAPI -> X DevAPI for C
1 parent a087e5c commit c11b00d

File tree

9 files changed

+64
-64
lines changed

9 files changed

+64
-64
lines changed

doc/DoxygenLayout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<navindex>
55
<tab type="mainpage" visible="yes" title=""/>
66
<tab type="user" url="@ref devapi" title="X DevAPI"/>
7-
<tab type="user" url="@ref xapi" title="XAPI"/>
7+
<tab type="user" url="@ref xapi" title="X DevAPI for C"/>
88
<tab type="modules" visible="no" title="" intro=""/>
99
<tab type="namespaces" visible="yes" title="">
1010
<tab type="namespacelist" visible="yes" title="" intro=""/>

doc/DoxygenLayout.xml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<navindex>
55
<tab type="mainpage" visible="yes" title=""/>
66
<tab type="user" url="@ref devapi" title="X DevAPI"/>
7-
<tab type="user" url="@ref xapi" title="XAPI"/>
7+
<tab type="user" url="@ref xapi" title="X DevAPI for C"/>
88
<tab type="modules" visible="no" title="" intro=""/>
99
<tab type="namespaces" visible="yes" title="">
1010
<tab type="namespacelist" visible="yes" title="" intro=""/>

doc/building.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ Building legacy C++ JDBC4 library @anchor build_jdbc
220220
---------------------------------
221221

222222
Apart from the new APIs introduced in version 8.0 of the connector (X DevAPI
223-
and XAPI), Connector/C++ also supports the legacy API based on JDBC4. This
224-
legacy API is implemented as a separate library with base name `mysqlcppconn`
225-
as opposed to `mysqlcppconn8` library implementing the new APIs.
223+
and X DevAPI for C), Connector/C++ also supports the legacy API based on JDBC4.
224+
This legacy API is implemented as a separate library with base name
225+
`mysqlcppconn` as opposed to `mysqlcppconn8` library implementing the new APIs.
226226

227227
To build the legacy library specify the `-DWITH_JDBC=ON` option during the cmake
228228
configuration step. This option is disabled by default. If specified, additional

doc/index.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ communicate with MySQL database servers. Version 8.0 of Connector/C++
66
implements three different APIs which can be used by applications:
77

88
- The new [X DevAPI] (@ref devapi) for applications written in C++.
9-
- The new [XAPI] (@ref xapi) for applications written in plain C.
9+
- The new [X DevAPI for C] (@ref xapi) for applications written in plain C.
1010
- The [legacy JDBC4-based API] (@ref jdbc_ref)
1111
also implemented in version 1.1 of the connector.
1212

@@ -28,7 +28,7 @@ explained in @ref usage.
2828
More information:
2929

3030
- [Connector/C++ X DevAPI Reference] (@ref devapi_ref)
31-
- [Connector/C++ XAPI Reference] (@ref xapi_ref)
31+
- [Connector/C++ X DevAPI for C Reference] (@ref xapi_ref)
3232
- [How to build code that uses Connector/C++](@ref usage)
3333
- [Building Connector/C++] (@ref building)
3434
- [Indexing Document Collections] (@ref indexing)

doc/indexing.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ Indexing Document Collections {#indexing}
44
Similar to indexes on relational tables, it is possible to define indexes
55
on document collections to improve efficiency of accessing documents
66
in the collection. To define such an index call X DevAPI method
7-
`Collection::createIndex()` or XAPI function `mysqlx_collection_create_index()`
8-
and pass a JSON document which specifies the index. The format of the index
9-
specification document is described below. The index can include one or more
10-
fields within indexed documents and it is possible to specify whether indexed
11-
fields are required to always exist. For indexing to work, values inside
12-
documents must be converted to SQL values. For that reason you must specify
13-
an SQL type to be used for each indexed field.
14-
7+
`Collection::createIndex()` or X DevAPI for C function
8+
`mysqlx_collection_create_index()` and pass a JSON document which specifies
9+
the index. The format of the index specification document is described below.
10+
The index can include one or more fields within indexed documents and it
11+
is possible to specify whether indexed fields are required to always exist.
12+
For indexing to work, values inside documents must be converted to SQL values.
13+
For that reason you must specify an SQL type to be used for each indexed field.
1514

1615
Index Specification
1716
-------------------

doc/usage.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Using Connector/C++ 8.0 {#usage}
22
=======================
33

44
Connector/C++ 8.0 implements new APIs for accessing document store of
5-
MySQL Server 8: X DevAPI for applications written in C++11 and XAPI for
6-
applications written in plain C. The same APIs can be also used to execute
5+
MySQL Server 8: X DevAPI for applications written in C++11 and X DevAPI for C
6+
for applications written in plain C. The same APIs can be also used to execute
77
traditional SQL queries. Connector/C++ 8.0 also implements the legacy C++ API
88
based on JDBC4 which is backward compatible with version 1.1 of the connector.
99

@@ -12,7 +12,7 @@ For X DevAPI include:
1212
~~~~~~
1313
#include <mysqlx/xdevapi.h>
1414
~~~~~~
15-
For XAPI include:
15+
For X DevAPI for C include:
1616
~~~~~~
1717
#include <mysqlx/xapi.h>
1818
~~~~~~
@@ -40,8 +40,8 @@ To build such code with Connector/C++ 8 without modifying it, add
4040

4141
The X DevAPI uses C++11 language features. For that reason enable C++11 support
4242
in the compiler using the `-std=c++11` option when building code that uses X DevAPI.
43-
This is not needed for XAPI (which is a plain C API) nor for the legacy JDBC API
44-
which is based on plain C++.
43+
This is not needed for X DevAPI for C (which is a plain C API) nor for
44+
the legacy JDBC API which is based on plain C++.
4545

4646

4747
@note The legacy API requires Boost headers. The location of these headers needs
@@ -59,8 +59,8 @@ Depending on the platform, the shared Connector/C++ library is named:
5959
- `mysqlcppconn8-1-vsXX.dll` on Windows platforms
6060
(with import library vsXX/mysqlcppconn8.lib, see [Windows Notes](@ref usage_win) for more details)
6161

62-
This library implements the new X DevAPI and XAPI. Connector/C++ 8.0 also
63-
includes the legacy connector library `libmsysqlcppconn(.so/.dylib/.dll)`
62+
This library implements the new X DevAPI and X DevAPI for C. Connector/C++ 8.0
63+
also includes the legacy connector library `libmsysqlcppconn(.so/.dylib/.dll)`
6464
which implements the legacy JDBC4 API.
6565

6666
To build code that uses new APIs, add `-lmysqlcppconn8` to the linker options
@@ -100,7 +100,7 @@ g++ -std=c++11 -I .../include -L .../lib64 app.cc -lmysqlcppconn8 -o app
100100
`-lmysqlcppconn`. Also, the option `-std=c++11` could be omitted unless the user
101101
code utilizes C++11.
102102

103-
The connector can be also used with plain C code written against XAPI.
103+
The connector can be also used with plain C code written against X DevAPI for C.
104104
An example `Makefile` to build a plain C application from sources in `app.c`
105105
might look like this:
106106

doc/xapi_ref.txt

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
Connector/C++ 8.0 XAPI Reference {#xapi_ref}
1+
Connector/C++ 8.0 X DevAPI for C Reference {#xapi_ref}
22
================================
33

4-
Connector/C++ implements a plain C interface, called XAPI, which offers
5-
functionality similar to that of X DevAPI and which can be used by applications
6-
written in plain C. XAPI allows one to work with MySQL Servers implementing
7-
a document store via the X Plugin. One can also execute plain SQL queries using
8-
this API.
4+
Connector/C++ implements a variant of X DevAPI that can be used by applications
5+
written in plain C - the X DevAPI for C. It allows one to work with MySQL
6+
Servers implementing a document store via the X Plugin. One can also execute
7+
plain SQL queries using this API.
98

10-
To get started, check out some of the main XAPI functions:
9+
To get started, check out some of the main X DevAPI for C functions:
1110

1211
- To access data first create a session using one of @link mysqlx_get_session
1312
`mysqlx_get_session_xxx()`@endlink functions. These functions return a pointer
@@ -50,11 +49,11 @@ To get started, check out some of the main XAPI functions:
5049
result in memory. It is however possible to buffer a complete result with
5150
the `mysqlx_store_result()` function.
5251

53-
Many functions in XAPI have a variable parameters list allowing passing
54-
arguments in a flexible way. A good illustration of this approach is binding
55-
values to `?` placeholders in an SQL query. The function `mysqlx_stmt_bind()`
56-
can bind the corresponding values to all parameters in just one call.
57-
For example:
52+
Many functions in X DevAPI for C have a variable parameters list allowing
53+
passing arguments in a flexible way. A good illustration of this approach
54+
is binding values to `?` placeholders in an SQL query. The function
55+
`mysqlx_stmt_bind()` can bind the corresponding values to all parameters
56+
in just one call. For example:
5857

5958
~~~~~~
6059
mysqlx_stmt_bind(stmt, PARAM_SINT(v_sint),
@@ -81,30 +80,32 @@ There are several things to keep in mind:
8180
so cannot be detected at the build time, but it will most likely result
8281
in an abnormal program termination.
8382

84-
A more complete example of code that access MySQL Database using the XAPI
85-
is presented below. See also [the list of XAPI Functions] (@ref xapi).
83+
A more complete example of code that access MySQL Database using the X DevAPI
84+
for C is presented below. See also
85+
[the list of X DevAPI for C Functions] (@ref xapi).
8686

8787

88-
### Sample code which uses Connector/C++ with XAPI ###
88+
### Sample code which uses Connector/C++ with X DevAPI for C ###
8989

90-
The following plain C application uses XAPI to connect to a MySQL Server with
91-
X Plugin, create a table, add a few rows into it using different ways such
92-
as plain SQL with parameters and table INSERT statements. Next, the code reads
93-
the table rows and displays the result.
90+
The following plain C application uses X DevAPI for C to connect to a MySQL
91+
Server with X Plugin, create a table, add a few rows into it using different
92+
ways such as plain SQL with parameters and table INSERT statements. Next,
93+
the code reads the table rows and displays the result.
9494

9595
The sample code can be found in file `testapp/xapi_test.cc` in the source
9696
distribution of Connector/C++ 8.0. See @ref usage for instructions on how
9797
to build the sample code.
9898

9999
@dontinclude xapi_test.c
100100

101-
Code which uses the Connector/C++ XAPI should include the `mysql_xapi.h` header.
101+
Code which uses the Connector/C++ X DevAPI for C should include
102+
the `mysqlx/xapi.h` header.
102103

103-
@skipline mysql_xapi.h
104+
@skipline mysqlx/xapi.h
104105

105-
Checking for errors is an essential part of any program, but in this sample code
106-
it can take too much space, therefore we introduce the convenience macros that
107-
check for statement errors, result errors and general errors:
106+
Checking for errors is an essential part of any program, but in this sample
107+
code it can take too much space, therefore we introduce the convenience macros
108+
that check for statement errors, result errors and general errors:
108109

109110
@skipline Error processing
110111
@until _WIN32

include/mysqlx/common/error.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#define MYSQLX_COMMON_ERROR_H
3333

3434
/*
35-
TODO: Error handling infrastructure for XDevAPI and XAPI still needs to
36-
be done. Current code is just a temporary hack.
35+
TODO: Error handling infrastructure for XDevAPI and X DevAPI for C still
36+
needs to be done. Current code is just a temporary hack.
3737
*/
3838

3939
#include <string>

include/mysqlx/xapi.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
*/
3030

3131
/**
32-
@defgroup xapi XAPI Functions
32+
@defgroup xapi X DevAPI for C
3333
34-
XAPI functions and types. See @ref xapi_ref for introduction.
34+
Functions and types defined by X DevAPI for C. See @ref xapi_ref for introduction.
3535
3636
@{
3737
@defgroup xapi_sess Session operations
@@ -59,10 +59,10 @@
5959

6060
/**
6161
@file
62-
The main header for MySQL Connector/C++ XAPI.
62+
The main header for MySQL Connector/C++ X DevAPI for C.
6363
64-
This header should be included by C and C++ code which uses the XAPI
65-
implemented by MySQL Connector/C++
64+
This header should be included by C and C++ code which uses the X DevAPI
65+
for C implemented by MySQL Connector/C++
6666
6767
@ingroup xapi
6868
*/
@@ -249,7 +249,7 @@ typedef struct mysqlx_table_struct mysqlx_table_t;
249249
/**
250250
Type of statement handles.
251251
252-
Some XAPI functions create statements without executing them. These
252+
Some X DevAPI for C functions create statements without executing them. These
253253
functions return a statement handle which can be used to define statement
254254
properties and then execute it.
255255
@@ -851,7 +851,7 @@ PUBLIC_API void mysqlx_free_options(mysqlx_session_options_t *opt);
851851
the value along with and all sequential types and values are most
852852
likely to be corrupted.
853853
Allowed types are listed in `mysqlx_opt_type_t` enum.
854-
The XAPI defines the convenience macros that help to specify
854+
The X DevAPI for C defines the convenience macros that help to specify
855855
the types and values: See `OPT_HOST()`, `OPT_PORT()`, `OPT_USER()`,
856856
`OPT_PWD()`, `OPT_DB()`, `OPT_SSL_MODE()`, `OPT_SSL_CA()`,
857857
`OPT_PRIORITY()`.
@@ -943,7 +943,7 @@ PUBLIC_API mysqlx_result_t * mysqlx_sql(mysqlx_session_t *sess,
943943
the value along with and all sequential types and values are most
944944
likely to be corrupted.
945945
Allowed types are listed in `mysqlx_data_type_t` enum.
946-
The XAPI defines the convenience macros that help to specify
946+
The X DevAPI for C defines the convenience macros that help to specify
947947
the types and values: See `PARAM_SINT()`, `PARAM_UINT()`,
948948
`PARAM_FLOAT()`, `PARAM_DOUBLE()`, `PARAM_BYTES()`,
949949
`PARAM_STRING()`.
@@ -1085,7 +1085,7 @@ mysqlx_collection_remove(mysqlx_collection_t *collection, const char*criteria);
10851085
For `MYSQLX_TYPE_BYTES` there will be one extra parameter specifying
10861086
the length of the binary data:
10871087
<field_path, MYSQLX_TYPE_BYTES, value, length>
1088-
The XAPI defines the convenience macros that help to specify
1088+
The X DevAPI for C defines the convenience macros that help to specify
10891089
the types and values: See `PARAM_SINT()`, `PARAM_UINT()`,
10901090
`PARAM_FLOAT()`, `PARAM_DOUBLE()`, `PARAM_BYTES()`,
10911091
`PARAM_STRING()`, `PARAM_EXPR()`:
@@ -1579,9 +1579,9 @@ mysqlx_table_select_limit(mysqlx_table_t *table, const char *criteria,
15791579
<column_name, value_type, value> triplets. The list
15801580
should be terminated using `PARAM_END`.
15811581
Allowed value types are listed in `mysqlx_data_type_t` enum.
1582-
The XAPI defines the convenience macros that help to specify
1583-
the types and values: See `PARAM_SINT()`, `PARAM_UINT()`,
1584-
`PARAM_FLOAT()`, `PARAM_DOUBLE()`, `PARAM_BYTES()`,
1582+
The X DevAPI for C defines the convenience macros that help
1583+
to specify the types and values: See `PARAM_SINT()`,
1584+
`PARAM_UINT()`, `PARAM_FLOAT()`, `PARAM_DOUBLE()`, `PARAM_BYTES()`,
15851585
`PARAM_STRING()`:
15861586
15871587
..., "col_uint", PARAM_UINT(uint_val),
@@ -1627,9 +1627,9 @@ mysqlx_table_delete(mysqlx_table_t *table, const char *criteria);
16271627
<column_name, value_type, value> triplets. The list
16281628
should be terminated using `PARAM_END`.
16291629
Allowed value types are listed in `mysqlx_data_type_t` enum.
1630-
The XAPI defines the convenience macros that help to specify
1631-
the types and values: See `PARAM_SINT()`, `PARAM_UINT()`,
1632-
`PARAM_FLOAT()`, `PARAM_DOUBLE()`, `PARAM_BYTES()`,
1630+
The X DevAPI for C defines the convenience macros that help
1631+
to specify the types and values: See `PARAM_SINT()`,
1632+
`PARAM_UINT()`, `PARAM_FLOAT()`, `PARAM_DOUBLE()`, `PARAM_BYTES()`,
16331633
`PARAM_STRING()`, `PARAM_EXPR()`:
16341634
16351635
..., "col_uint", PARAM_EXPR("col_uint * 100"),

0 commit comments

Comments
 (0)