Skip to content

Commit 96bb2b0

Browse files
rsomla1Daniel Horecki
authored andcommitted
8.0.7 documentation update - post review fixes.
1 parent eed4410 commit 96bb2b0

File tree

4 files changed

+82
-97
lines changed

4 files changed

+82
-97
lines changed

doc/building.txt

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Only out-of-source builds are supported. To configure a build, execute
2929
$ cmake <Connector/C++ source location>
3030
~~~~~~~
3131

32-
If Boost libraries are required and `cmake` can not find them, specify the
32+
If Boost libraries are required and `cmake` cannot find them, specify the
3333
correct location using the option:
3434

3535
- `-DWITH_BOOST=<Boost location>`
@@ -38,8 +38,10 @@ By default a shared library is built. To build a static library, use the option:
3838

3939
- `-DBUILD_STATIC=yes`
4040

41-
The build system generated by `cmake` has install target which, by default, installs to `/usr/local/mysql/connector-c++-8.0`
42-
(`<User home>/MySQL/"MySQL Connector C++ 8.0"` on Windows). To change this default install location use the option:
41+
The build system generated by `cmake` has install target which, by default,
42+
installs to `/usr/local/mysql/connector-c++-8.0`
43+
(`<User home>/MySQL/"MySQL Connector C++ 8.0"` on Windows).
44+
To change this default install location use the option:
4345

4446
- `-DCMAKE_INSTALL_PREFIX=<Install location>`
4547

@@ -90,7 +92,9 @@ the Connector/C++ shared library:
9092
- `CCC/mysqlcppconn8-1-vsXX.dll` on Windows, where `-vs12` or `-vs14` prefix
9193
depends on the MSVC version used to build the connector
9294

93-
The number 1 in the library name is the major ABI version of the library. It is part of the library name so that different versions of the library can be used at the same time on a single system.
95+
The number 1 in the library name is the major ABI version of the library. It
96+
is part of the library name so that different versions of the library can
97+
be used at the same time on a single system.
9498

9599
On Unix and OS X also appropriate symbolic links are created. On Windows the
96100
import library for the DLL is created at `CCC/mysqlcppconn8.lib` (the `CCC/`
@@ -134,7 +138,8 @@ $ cmake --build . --config CCC
134138
~~~~~~~
135139

136140
This should create the `devapi_test` and `xapi_test` executables
137-
in the `run/` subdirectory of the build location. If testing static connector, pass `-DBUILD_STATIC=ON` option when configuring test applications.
141+
in the `run/` subdirectory of the build location. If testing static connector,
142+
pass the `-DBUILD_STATIC=ON` option when configuring test applications.
138143

139144
@note
140145
On Windows, if the connector was built with the static runtime by specifying
@@ -160,8 +165,9 @@ started like this, the plugin will listen on port 13009 instead of
160165
the standard 33060 one.
161166

162167
Now you can run one of the test programs and see the output similar to the
163-
one presented below. Test programs accept a connection string as an argument.
164-
If the server was started as described above, run the test program with the following connection string as a parameter:
168+
one presented below. Test programs accept a connection-string argument.
169+
If the server was started as described above, run the test program with
170+
the following connection string as a parameter:
165171

166172
~~~~~~~
167173
$ run/devapi_test mysqlx://[email protected]:13009
@@ -218,24 +224,27 @@ and XAPI), Connector/C++ also supports the legacy API based on JDBC4. This
218224
legacy API is implemented as a separate library with base name `mysqlcppconn`
219225
as opposed to `mysqlcppconn8` library implementing the new APIs.
220226

221-
To build the legacy library pass `-DWITH_JDBC=ON` option during cmake
222-
configuration step (this option is disabled by default). This brings additional
223-
build dependencies that must be satisfied:
227+
To build the legacy library specify the `-DWITH_JDBC=ON` option during the cmake
228+
configuration step. This option is disabled by default. If specified, additional
229+
build dependencies must be satisfied:
224230

225-
- The MySQL 8.0 client library is needed. If `cmake` can not find it at default
226-
locations, pass `-DMYSQL_DIR=<path_to_mysql_server_dir>` option.
231+
- The MySQL 8.0 client library is needed. If `cmake` cannot find it at
232+
the default locations, pass the `-DMYSQL_DIR=<path_to_mysql_server_dir>`
233+
option.
227234

228235
- Boost libraries are always required in this case. As explained above, use
229-
`WITH_BOOST` option if `cmake` can not find Boost at default locations.
236+
the `WITH_BOOST` option if `cmake` cannot find Boost at the default locations.
230237

231238
@note
232-
The code implementing legacy connector is inside `jdbc/` subdirectory of the
233-
source tree. If sources are obtained from a git repository this sub-directory
234-
must be fetched separately as a git sub-module. Invoke
235-
`git submodule update --init` to populate contents of `jdbc/` subdirectory.
239+
The code implementing the legacy connector is inside the `jdbc/` subdirectory
240+
of the source tree. If sources are obtained from a git repository, this
241+
subdirectory must be fetched separately as a git sub-module. Invoke
242+
`git submodule update --init` to populate the contents of the `jdbc/`
243+
subdirectory.
244+
236245

237246
If everything goes well, after building the connector the build location
238-
should contain additional legacy connector library:
247+
should contain an additional legacy connector library:
239248

240249
- `libmysqlcppconn.so.7` on Unix
241250
- `libmysqlcppconn.7.dylib` on OS X
@@ -248,14 +257,14 @@ If building static libraries, the static legacy library has name:
248257
on Windows
249258

250259

251-
It is possible to build additional test application `jdbc_test` for testing
252-
the legacy connector library. To do this, pass `-DWITH_JDBC=ON` cmake option
260+
It is possible to build an additional test application `jdbc_test` for testing
261+
the legacy connector library. To do this, pass the `-DWITH_JDBC=ON` cmake option
253262
when configuring the build of test applications. Also, `MYSQL_DIR`
254-
and `WITH_BOOST` must be set of cmake can not find required dependencies.
263+
and `WITH_BOOST` must be set if cmake cannot find the required dependencies.
255264

256-
The connection string accepted as argument of `jdbc_test` application must be
257-
in the form expected by JDBC API. The user name is passed as the 2nd argument.
258-
For example:
265+
The connection-string argument that the `jdbc_test` application accepts must
266+
be in the form specified by the JDBC API. The user name is passed as the second
267+
argument. For example:
259268

260269
~~~~~~~
261270
$ run/jdbc_test tcp://127.0.0.1:13009 root
@@ -264,17 +273,17 @@ $ run/jdbc_test tcp://127.0.0.1:13009 root
264273

265274
Windows Notes @anchor win_notes
266275
-------------
267-
Connector/C++ uses C++11 language and for that reason it is not possible
276+
Connector/C++ uses the C++11 language and for that reason it is not possible
268277
to build it with Microsoft Visual Studio 2010 or earlier.
269278

270279
On Windows one can request that Connector/C++ uses the static runtime library
271-
(The `/MT*` compiler option) by setting the cmake option `-DSTATIC_MSVCRT=yes`.
280+
(the `/MT*` compiler option) by setting the cmake option `-DSTATIC_MSVCRT=yes`.
272281
This might be necessary if code which uses Connector/C++ also uses the static
273-
runtime. If building static library in this mode, the `-mt` suffix will
282+
runtime. If building the static library in this mode, the `-mt` suffix will
274283
be added to its name to distinguish it from a library built in `/MD` mode.
275284

276285
Selecting a cmake generator such as `"Visual Studio 14 2015 Win64"` vs
277-
`"Visual Studio 14 2015"` selects the 64 or 32 bit platform for which
286+
`"Visual Studio 14 2015"` selects the 64-bit or 32-bit platform for which
278287
the connector is built. An application which uses Connector/C++ must
279288
be built for the same platform as the connector.
280289

doc/index.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ MySQL Connector/C++ Documentation {#mainpage}
33

44
MySQL Connector/C++ is a library for applications written in C or C++ that
55
communicate with MySQL database servers. Version 8.0 of Connector/C++
6-
implements three different APIs which can be used by applications...
6+
implements three different APIs which can be used by applications:
77

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

1313
The new APIs give access to MySQL implementing a [document store]

doc/jdbc_ref.txt

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,16 @@
1-
Connector/C++ 8.0 legacy C++ API based on JDBC4 Reference {#jdbc_ref}
1+
Connector/C++ 8.0 legacy C++ API based on JDBC4 {#jdbc_ref}
22
=======================================
33

4-
Connector/C++ 8.0 supports the legacy C++ API based on JDBC4 specification.
4+
Connector/C++ 8.0 supports the legacy C++ API based on the JDBC4 specification.
55

66
This allows an easy migration to Connector/C++ version 8.0 for applications
7-
that use Connector/C++ version 1.1.
7+
that use Connector/C++ version 1.1.
88

99
More detailed information about the legacy C++ API can be found in the
1010
[X MySQL Connector/C++ Developer Guide]
1111
(https://dev.mysql.com/doc/connector-cpp/en/)
1212
of MySQL online manual.
1313

14-
Source distributions of Connector/C++ include an examples directory
15-
containing usage examples that explain how to use the following classes:
16-
17-
- `Connection`
18-
19-
- `Driver`
20-
21-
- `PreparedStatement`
22-
23-
- `ResultSet`
24-
25-
- `ResultSetMetaData`
26-
27-
- `Statement`
28-
29-
The examples cover:
30-
31-
- Using the Driver class to connect to MySQL
32-
33-
- Creating tables, inserting rows, fetching rows using (simple) statements
34-
35-
- Creating tables, inserting rows, fetching rows using prepared statements
36-
37-
- Hints for working around prepared statement limitations
38-
39-
- Accessing result set metadata
4014

4115
### Sample code which uses Connector/C++ with legacy C++ API ###
4216

@@ -46,14 +20,14 @@ legacy C++ API.
4620
@note
4721
The connection is established over the legacy protocol and therefore
4822
X Plugin is not needed and the server does not need to support X Protocol.
49-
23+
5024
After the connection is established the code executes a simple SQL statement
5125
and reads the result from the server. The source file can be found in
5226
testapp/jdbc_test.cc in the source distribution of Connector/C++ 8.0.
5327
See @ref usage for instructions on how to build the sample code.
5428

55-
Each program which is using the legacy C++ API has to do the following
56-
includes:
29+
Each program which uses the legacy C++ API has to include the following
30+
headers:
5731

5832
@dontinclude jdbc_test.cc
5933
@skip #include <jdbc/mysql_connection.h>
@@ -64,8 +38,8 @@ These headers are needed for using the `ResultSet` and `Statement` classes:
6438
@skip #include <jdbc/cppconn/resultset.h>
6539
@until #include <jdbc/cppconn/statement.h>
6640

67-
Define the credentials for connecting, process command line params and
68-
other housekeeping stuff:
41+
Define the credentials for connecting, process command line parameters and
42+
other housekeeping:
6943

7044
@skip #define DEFAULT_URI "tcp://127.0.0.1"
7145
@until try {
@@ -82,16 +56,16 @@ Make sure that you free con, the `sql::Connection` object, as soon as you do
8256
not need it any more. But do not explicitly free driver, the connector object.
8357
Connector/C++ takes care of freeing that.
8458

85-
@note `get_mysql_driver_instance()` calls `get_driver_instance()`, which is
59+
@note `get_mysql_driver_instance()` calls `get_driver_instance()`, which is
8660
not thread-safe. Either avoid invoking these methods from within multiple
8761
threads at once, or surround the calls with a mutex to prevent simultaneous
88-
execution in multiple threads.
62+
execution in multiple threads.
8963

9064
These methods can be used to check the connection state or reconnect:
9165

9266
- `sql::Connection::isValid()` checks whether the connection is alive
9367

94-
- `sql::Connection::reconnect()` reconnects if the connection has gone down
68+
- `sql::Connection::reconnect()` reconnects if the connection has gone down
9569

9670
The `sql::Connection` is used to set the schema and create a statement:
9771

@@ -115,14 +89,14 @@ prepared statements. If your query returns one result set, use
11589
`sql::Statement::executeQuery()` or `sql::PreparedStatement::executeQuery()`
11690
to run your query. Both methods return `sql::ResultSet` objects.
11791
By default, Connector/C++ buffers all result sets on the client to support
118-
cursors.
92+
cursors.
11993

12094
The code below walks through the entire result set row by row using
121-
`sql::ResultSet::next()` method, which returns `true` if the row was sucessfully
122-
read. Otherwise it returns `false`, which means we reached the end of the
123-
result set and there are no more rows to read.
95+
`sql::ResultSet::next()` method, which returns `true` if the row was
96+
successfully read. Otherwise it returns `false`, which means we reached the end
97+
of the result set and there are no more rows to read.
12498

125-
The actual data is obtained trhough the getXxxx() functions such as
99+
The actual data is obtained through the getXxxx() functions such as
126100
`getInt(), getString()`, etc. The columns can be indexed by numbers in the
127101
order they are given inside the result set starting from 1.
128102
Alternatively the column name can be used as a string index.

0 commit comments

Comments
 (0)