ruby-mysql 2.9.14 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +50 -0
- data/README.md +28 -0
- data/lib/mysql/authenticator/caching_sha2_password.rb +62 -0
- data/lib/mysql/authenticator/mysql_native_password.rb +37 -0
- data/lib/mysql/authenticator/sha256_password.rb +40 -0
- data/lib/mysql/authenticator.rb +84 -0
- data/lib/mysql/charset.rb +379 -328
- data/lib/mysql/constants.rb +91 -44
- data/lib/mysql/error.rb +13 -7
- data/lib/mysql/protocol.rb +243 -210
- data/lib/mysql.rb +183 -338
- data/test/test_mysql.rb +264 -550
- metadata +18 -12
- data/README.rdoc +0 -68
metadata
CHANGED
@@ -1,24 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-mysql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomita Masahiro
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is MySQL connector. pure Ruby version
|
14
14
|
email: tommy@tmtm.org
|
15
15
|
executables: []
|
16
16
|
extensions: []
|
17
|
-
extra_rdoc_files:
|
18
|
-
- README.rdoc
|
17
|
+
extra_rdoc_files: []
|
19
18
|
files:
|
20
|
-
-
|
19
|
+
- CHANGELOG.md
|
20
|
+
- README.md
|
21
21
|
- lib/mysql.rb
|
22
|
+
- lib/mysql/authenticator.rb
|
23
|
+
- lib/mysql/authenticator/caching_sha2_password.rb
|
24
|
+
- lib/mysql/authenticator/mysql_native_password.rb
|
25
|
+
- lib/mysql/authenticator/sha256_password.rb
|
22
26
|
- lib/mysql/charset.rb
|
23
27
|
- lib/mysql/constants.rb
|
24
28
|
- lib/mysql/error.rb
|
@@ -29,8 +33,11 @@ files:
|
|
29
33
|
homepage: http://github.com/tmtm/ruby-mysql
|
30
34
|
licenses:
|
31
35
|
- Ruby
|
32
|
-
metadata:
|
33
|
-
|
36
|
+
metadata:
|
37
|
+
homepage_uri: http://github.com/tmtm/ruby-mysql
|
38
|
+
documentation_uri: https://www.rubydoc.info/github/tmtm/ruby-mysql/
|
39
|
+
source_code_uri: http://github.com/tmtm/ruby-mysql
|
40
|
+
post_install_message:
|
34
41
|
rdoc_options: []
|
35
42
|
require_paths:
|
36
43
|
- lib
|
@@ -45,11 +52,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
52
|
- !ruby/object:Gem::Version
|
46
53
|
version: '0'
|
47
54
|
requirements: []
|
48
|
-
|
49
|
-
|
50
|
-
signing_key:
|
55
|
+
rubygems_version: 3.3.0.dev
|
56
|
+
signing_key:
|
51
57
|
specification_version: 4
|
52
58
|
summary: MySQL connector
|
53
59
|
test_files:
|
54
|
-
- test/test_mysql_packet.rb
|
55
60
|
- test/test_mysql.rb
|
61
|
+
- test/test_mysql_packet.rb
|
data/README.rdoc
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
= ruby-mysql
|
2
|
-
|
3
|
-
== Description
|
4
|
-
|
5
|
-
MySQL connector for Ruby.
|
6
|
-
|
7
|
-
== Installation
|
8
|
-
|
9
|
-
ruby setup.rb
|
10
|
-
|
11
|
-
=== Gem Installation
|
12
|
-
|
13
|
-
gem install ruby-mysql
|
14
|
-
|
15
|
-
== Features/Problems
|
16
|
-
|
17
|
-
* Ruby だけで書かれているのでコンパイル不要です。
|
18
|
-
|
19
|
-
* Ruby 1.9.x の M17N に対応しています。
|
20
|
-
|
21
|
-
* MySQL/Ruby 2.8.x とほぼ互換があります。
|
22
|
-
|
23
|
-
== Synopsis
|
24
|
-
|
25
|
-
使用例:
|
26
|
-
|
27
|
-
my = Mysql.connect('hostname', 'username', 'password', 'dbname')
|
28
|
-
my.query("select col1, col2 from tblname").each do |col1, col2|
|
29
|
-
p col1, col2
|
30
|
-
end
|
31
|
-
stmt = my.prepare('insert into tblname (col1,col2) values (?,?)')
|
32
|
-
stmt.execute 123, 'abc'
|
33
|
-
|
34
|
-
== Incompatible with MySQL/Ruby 2.8.x
|
35
|
-
|
36
|
-
* Ruby 1.8.x ではシフトJISのような安全でないマルチバイト文字セットに対して Mysql#escape_string を使用すると例外が発生します。
|
37
|
-
|
38
|
-
* いくつかのメソッドがありません: Mysql#debug, Mysql#change_user,
|
39
|
-
Mysql#create_db, Mysql#drop_db, Mysql#dump_debug_info,
|
40
|
-
Mysql#ssl_set, Mysql#reconnect
|
41
|
-
|
42
|
-
* Mysql#options でサポートしているオプションは次のものだけです:
|
43
|
-
Mysql::INIT_COMMAND, Mysql::OPT_CONNECT_TIMEOUT,
|
44
|
-
Mysql::OPT_LOCAL_INFILE, Mysql::OPT_READ_TIMEOUT,
|
45
|
-
Mysql::OPT_WRITE_TIMEOUT, Mysql::SET_CHARSET_NAME.
|
46
|
-
これら以外を指定すると "option not implementted" という warning が標準エラー出力に出力されます。
|
47
|
-
|
48
|
-
* Mysql#use_result は Mysql#store_result と同じです。つまりサーバーから一気に結果セットを読み込みます。
|
49
|
-
|
50
|
-
== Improvement from MySQL/Ruby 2.8.x
|
51
|
-
|
52
|
-
* Ruby 1.9.x の M17N に対応しています。
|
53
|
-
mysqld へのクエリ文字列やプリペアドステートメントで与える値は mysqld との接続の文字コードに自動的に変換されます。
|
54
|
-
mysqld からの結果文字列は接続文字コードとして取り出されます。
|
55
|
-
|
56
|
-
* Mysql::Result, Mysql::Stmt が Enumerable を include しています。
|
57
|
-
|
58
|
-
* ブロックなしの Mysql::Result#each, each_hash Mysql::Stmt#each, each_hash が Enumerator を返します。
|
59
|
-
|
60
|
-
* Mysql#charset= で接続 charset を指定できます。
|
61
|
-
|
62
|
-
* Mysql::Error だけでなく、エラー種別ごとにエラークラスが用意されてます。たとえば、構文エラーの場合は Mysql::ServerError::ParseError など。これらのエラーは Mysql::Error の継承クラスです。
|
63
|
-
|
64
|
-
== Copyright
|
65
|
-
|
66
|
-
Author :: TOMITA Masahiro <tommy@tmtm.org>
|
67
|
-
Copyright :: Copyright (c) 2009-2012 TOMITA Masahiro
|
68
|
-
License :: Ruby's
|