-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
99 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
## [3.0.0] - 2021-11-xx | ||
|
||
- `Mysql.new` no longer connect. use `Mysql.connect` or `Mysql#connect`. | ||
|
||
- `Mysql.init` is removed. use `Mysql.new` instead. | ||
|
||
- `Mysql.new`, `Mysql.conncet` and `Mysql#connect` takes URI object or URI string or Hash object. | ||
example: | ||
Mysql.connect('mysql://user:password@hostname:port/dbname?charset=ascii') | ||
Mysql.connect('mysql://user:password@%2Ftmp%2Fmysql.sock/dbname?charset=ascii') # for UNIX socket | ||
Mysql.connect('hostname', 'user', 'password', 'dbname') | ||
Mysql.connect(host: 'hostname', username: 'user', password: 'password', database: 'dbname') | ||
|
||
- `Mysql.options` is removed. use `Mysql#param = value` instead. | ||
For example: | ||
m = Mysql.init | ||
m.options(Mysql::OPT_LOCAL_INFILE, true) | ||
m.connect(host, user, passwd) | ||
change to | ||
m = Mysql.new | ||
m.local_infile = true | ||
m.connect(host, user, passwd) | ||
or | ||
m = Mysql.connect(host, user, passwd, local_infile: true) | ||
|
||
- `Mysql::Time` is removed. | ||
Instead, `Time` object is returned for the DATE, DATETIME, TIMESTAMP data, | ||
and `Integer` object is returned for the TIME data. | ||
If DATE, DATETIME, TIMESTAMP are invalid values for Time, nil is returned. | ||
|
||
- meaningless methods are removed: | ||
* `bind_result` | ||
* `client_info` | ||
* `client_version` | ||
* `get_proto_info` | ||
* `get_server_info` | ||
* `get_server_version` | ||
* `proto_info` | ||
* `query_with_result` | ||
|
||
- alias method are removed: | ||
* `get_host_info`: use `host_info` | ||
* `real_connect`: use `connect` | ||
* `real_query`: use `query` | ||
|
||
- methods corresponding to deprecated APIs in MySQL are removed: | ||
* `list_dbs`: use `SHOW DATABASES` | ||
* `list_fields`: use `SHOW COLUMNS` | ||
* `list_processes`: use `SHOW PROCESSLIST` | ||
* `list_tables`: use `SHOW TABLES` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2014 Brian Lopez | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# ruby-mysql | ||
|
||
## Description | ||
|
||
MySQL connector for Ruby. | ||
|
||
## Installation | ||
|
||
``` | ||
gem install ruby-mysql | ||
``` | ||
|
||
## Synopsis | ||
|
||
```ruby | ||
my = Mysql.connect('mysql://username:password@hostname:port/dbname?charset=utf8mb4') | ||
my.query("select col1, col2 from tblname").each do |col1, col2| | ||
p col1, col2 | ||
end | ||
stmt = my.prepare('insert into tblname (col1,col2) values (?,?)') | ||
stmt.execute 123, 'abc' | ||
``` | ||
|
||
## Copyright | ||
|
||
* Author: TOMITA Masahiro <[email protected]> | ||
* Copyright: Copyright 2008 TOMITA Masahiro | ||
* License: MIT |
This file was deleted.
Oops, something went wrong.