Skip to content

Commit 95bf8a2

Browse files
author
Marcin Bunsch
committed
Moving the init_command section in README
1 parent 23718ca commit 95bf8a2

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,6 @@ Mysql2::Client.new(
161161
)
162162
```
163163

164-
### init_command
165-
166-
If you specify the init_command option, the SQL string you provide will be executed after the connection is established.
167-
168-
If `:reconnect` is set to `true`, init_command will also be executed after a successful reconnect.
169-
170-
It is useful if you want to provide session options which survive reconnection.
171-
172-
``` ruby
173-
Mysql2::Client.new(:init_command => "SET @@SESSION.sql_mode = 'STRICT_ALL_TABLES'")
174-
```
175164

176165
### SSL options
177166

@@ -264,6 +253,15 @@ the `:default_file` and `:default_group` paramters. For example:
264253
Mysql2::Client.new(:default_file => '/user/.my.cnf', :default_group => 'client')
265254
```
266255

256+
### init_command
257+
258+
If you specify the init_command option, the SQL string you provide will be executed after the connection is established.
259+
If `:reconnect` is set to `true`, init_command will also be executed after a successful reconnect.
260+
It is useful if you want to provide session options which survive reconnection.
261+
262+
``` ruby
263+
Mysql2::Client.new(:init_command => "SET @@SESSION.sql_mode = 'STRICT_ALL_TABLES'")
264+
```
267265

268266
## Cascading config
269267

0 commit comments

Comments
 (0)