Skip to content

Commit

Permalink
Add createDatabaseIfNotExist option to README
Browse files Browse the repository at this point in the history
  • Loading branch information
mirromutth committed Dec 15, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 51f9e3e commit 4517ade
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -125,6 +125,7 @@ ConnectionFactoryOptions options = ConnectionFactoryOptions.builder()
.option(PORT, 3306) // optional, default 3306
.option(PASSWORD, "database-password-in-here") // optional, default null, null means has no password
.option(DATABASE, "r2dbc") // optional, default null, null means not specifying the database
.option(Option.valueOf("createDatabaseIfNotExist"), true) // optional, default false, create database if not exist (since 1.0.6 / 0.9.7)
.option(CONNECT_TIMEOUT, Duration.ofSeconds(3)) // optional, default null, null means no timeout
.option(Option.valueOf("socketTimeout"), Duration.ofSeconds(4)) // deprecated since 1.0.1, because it has no effect and serves no purpose.
.option(SSL, true) // optional, default sslMode is "preferred", it will be ignore if sslMode is set
@@ -172,6 +173,7 @@ MySqlConnectionConfiguration configuration = MySqlConnectionConfiguration.builde
.port(3306) // optional, default 3306
.password("database-password-in-here") // optional, default null, null means has no password
.database("r2dbc") // optional, default null, null means not specifying the database
.createDatabaseIfNotExist(true) // optional, default false, create database if not exist (since 1.0.6 / 0.9.7)
.serverZoneId(ZoneId.of("Continent/City")) // optional, default null, null means query server time zone when connection init
.connectTimeout(Duration.ofSeconds(3)) // optional, default null, null means no timeout
.socketTimeout(Duration.ofSeconds(4)) // deprecated since 1.0.1, because it has no effect and serves no purpose.
@@ -221,6 +223,7 @@ Mono<Connection> connectionMono = Mono.from(connectionFactory.create());
| user | A valid MySQL username and not be empty | Required | Who wants to connect to the MySQL database |
| password | Any printable string | Optional, default no password | The password of the MySQL database user |
| database | A valid MySQL database name | Optional, default does not initialize database | Database used by the MySQL connection |
| createDatabaseIfNotExist | `true` or `false` | Optional, default `false` | Create database if not exist |
| connectTimeout | A `Duration` which must be positive duration | Optional, default has no timeout | TCP connect timeout |
| socketTimeout | A `Duration` which must be positive duration | Deprecated since 1.0.1 | TCP socket timeout |
| serverZoneId | An id of `ZoneId` | Optional, default query time zone when connection init | Server time zone id |

0 comments on commit 4517ade

Please sign in to comment.