db-mariadb 0.9.3 → 0.10.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 +4 -4
- checksums.yaml.gz.sig +1 -0
- data/lib/db/mariadb/connection.rb +4 -0
- data/lib/db/mariadb/native/field.rb +29 -19
- data/lib/db/mariadb/native/types.rb +74 -16
- data/lib/db/mariadb/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +45 -18
- metadata.gz.sig +0 -0
- data/lib/.DS_Store +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab51802cd32f07df19ec06d20387a41b5ae0e75997cfdf401b39d5e640aafc9f
|
4
|
+
data.tar.gz: '0982b11fde892f31b985aefb50b07fa59f884e4622acf9c573bbc466ef7cd713'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e71f4a60ca3502e579dd65f6d969dc4e468badec1e875bb3cd55c6ec6fd776b97003a510511e933bb9543fcbd4906dedb870a68a0bc0b108a24cc889bb120f95
|
7
|
+
data.tar.gz: 29f11c2551d1ba41e4ae5438100763f81825072c7c84a7ded4567abd02581a944ba2c621f1a771fd81c0e7379570618e0818c9fafd6ee6f0e23a3c917dc930bf
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
���b,l��`1,o��~��T-e�Z�^�[�j�P�L�_��~�����L�D]Āչ��T��|�.Ҏy��Sl.Ƚ��)�I~@��DSNM��A���!E���À,�a�����-� 0��x�}Ѭ�����/n����K�^�cx3馥���X�(��q��f��� �̑5�yMM��+~1���rgf�>���8������I��ˈ ד#`ثQ�y��mۈ��J�{�zd<�v��4:���WF/�0�q����s�����x���N��CaO��qJ���h�[Z9)�����5�yT�6����T�n��@3f���4�f�-����(�%�0�oX�;d�Ľ��V'Q�_�&D���&�ɠN_�rE>.
|
@@ -60,25 +60,35 @@ module DB
|
|
60
60
|
])
|
61
61
|
|
62
62
|
DEFAULT_TYPES = {
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
63
|
+
# Pseudo types:
|
64
|
+
primary_key: Types::Integer.new('BIGINT AUTO_INCREMENT PRIMARY KEY'),
|
65
|
+
foreign_key: Types::Integer.new('BIGINT'),
|
66
|
+
text: Types::Text.new("TEXT"),
|
67
|
+
string: Types::Text.new("VARCHAR(255)"),
|
68
|
+
|
69
|
+
# Aliases
|
70
|
+
smallint: Types::Integer.new("SHORT"),
|
71
|
+
integer: Types::Integer.new("INTEGER"),
|
72
|
+
bigint: Types::Integer.new("LONG"),
|
73
|
+
|
74
|
+
# Native types:
|
75
|
+
decimal: Types::Decimal.new,
|
76
|
+
boolean: Types::Boolean.new,
|
77
|
+
tiny: Types::Integer.new("TINY"),
|
78
|
+
short: Types::Integer.new("SHORT"),
|
79
|
+
long: Types::Integer.new("LONG"),
|
80
|
+
float: Types::Float.new,
|
81
|
+
double: Types::Float.new("DOUBLE"),
|
82
|
+
timestamp: Types::DateTime.new("TIMESTAMP"),
|
83
|
+
date: Types::Date.new,
|
84
|
+
datetime: Types::DateTime.new("DATETIME"),
|
85
|
+
year: Types::Integer.new("YEAR"),
|
86
|
+
newdate: Types::DateTime.new("DATETIME"),
|
87
|
+
bit: Types::Integer.new("BIT"),
|
88
|
+
json: Types::JSON.new,
|
89
|
+
newdecimal: Types::Decimal.new,
|
90
|
+
enum: Types::Symbol.new,
|
91
|
+
set: Types::Integer.new("SET"),
|
82
92
|
}
|
83
93
|
|
84
94
|
class Field < FFI::Struct
|
@@ -18,8 +18,6 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
19
|
# THE SOFTWARE.
|
20
20
|
|
21
|
-
require 'ffi'
|
22
|
-
|
23
21
|
require 'json'
|
24
22
|
require 'bigdecimal'
|
25
23
|
|
@@ -27,14 +25,36 @@ module DB
|
|
27
25
|
module MariaDB
|
28
26
|
module Native
|
29
27
|
module Types
|
30
|
-
|
31
|
-
def
|
28
|
+
class Text
|
29
|
+
def initialize(name = "TEXT")
|
30
|
+
@name = name
|
31
|
+
end
|
32
|
+
|
33
|
+
attr :name
|
34
|
+
|
35
|
+
def parse(string)
|
36
|
+
string
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
class Integer
|
41
|
+
def initialize(name = "INTEGER")
|
42
|
+
@name = name
|
43
|
+
end
|
44
|
+
|
45
|
+
attr :name
|
46
|
+
|
47
|
+
def parse(string)
|
32
48
|
Integer(string) if string
|
33
49
|
end
|
34
50
|
end
|
35
51
|
|
36
|
-
|
37
|
-
def
|
52
|
+
class Boolean
|
53
|
+
def name
|
54
|
+
"BOOLEAN"
|
55
|
+
end
|
56
|
+
|
57
|
+
def parse(string)
|
38
58
|
case string
|
39
59
|
when '0'
|
40
60
|
false
|
@@ -48,26 +68,46 @@ module DB
|
|
48
68
|
end
|
49
69
|
end
|
50
70
|
|
51
|
-
|
52
|
-
def
|
71
|
+
class Decimal
|
72
|
+
def name
|
73
|
+
"DECIMAL"
|
74
|
+
end
|
75
|
+
|
76
|
+
def parse(string)
|
53
77
|
BigDecimal(string) if string
|
54
78
|
end
|
55
79
|
end
|
56
80
|
|
57
|
-
|
58
|
-
def
|
81
|
+
class Float
|
82
|
+
def initialize(name = "FLOAT")
|
83
|
+
@name = name
|
84
|
+
end
|
85
|
+
|
86
|
+
attr :name
|
87
|
+
|
88
|
+
def parse(string)
|
59
89
|
Float(string) if string
|
60
90
|
end
|
61
91
|
end
|
62
92
|
|
63
|
-
|
64
|
-
def
|
93
|
+
class Symbol
|
94
|
+
def name
|
95
|
+
"ENUM"
|
96
|
+
end
|
97
|
+
|
98
|
+
def parse(string)
|
65
99
|
string&.to_sym
|
66
100
|
end
|
67
101
|
end
|
68
102
|
|
69
|
-
|
70
|
-
def
|
103
|
+
class DateTime
|
104
|
+
def initialize(name = "DATETIME")
|
105
|
+
@name = name
|
106
|
+
end
|
107
|
+
|
108
|
+
attr :name
|
109
|
+
|
110
|
+
def parse(string)
|
71
111
|
if string
|
72
112
|
parts = string.split(/[\-\s:]/)
|
73
113
|
|
@@ -76,8 +116,26 @@ module DB
|
|
76
116
|
end
|
77
117
|
end
|
78
118
|
|
79
|
-
|
80
|
-
def
|
119
|
+
class Date
|
120
|
+
def name
|
121
|
+
"DATE"
|
122
|
+
end
|
123
|
+
|
124
|
+
def parse(string)
|
125
|
+
if string
|
126
|
+
parts = string.split(/[\-\s:]/)
|
127
|
+
|
128
|
+
return Time.utc(*parts)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
class JSON
|
134
|
+
def name
|
135
|
+
"JSON"
|
136
|
+
end
|
137
|
+
|
138
|
+
def parse(string)
|
81
139
|
::JSON.parse(string, symbolize_names: true) if string
|
82
140
|
end
|
83
141
|
end
|
data/lib/db/mariadb/version.rb
CHANGED
data.tar.gz.sig
ADDED
Binary file
|
metadata
CHANGED
@@ -1,43 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: db-mariadb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11
|
14
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NvLm56MA0GCSqGSIb3DQEB
|
29
|
+
CwUAA4IBgQBVoM+pu3dpdUhZM1w051iw5GfiqclAr1Psypf16Tiod/ho//4oAu6T
|
30
|
+
9fj3DPX/acWV9P/FScvqo4Qgv6g4VWO5ZU7z2JmPoTXZtYMunRAmQPFL/gSUc6aK
|
31
|
+
vszMHIyhtyzRc6DnfW2AiVOjMBjaYv8xXZc9bduniRVPrLR4J7ozmGLh4o4uJp7w
|
32
|
+
x9KCFaR8Lvn/r0oJWJOqb/DMAYI83YeN2Dlt3jpwrsmsONrtC5S3gOUle5afSGos
|
33
|
+
bYt5ocnEpKSomR9ZtnCGljds/aeO1Xgpn2r9HHcjwnH346iNrnHmMlC7BtHUFPDg
|
34
|
+
Ts92S47PTOXzwPBDsrFiq3VLbRjHSwf8rpqybQBH9MfzxGGxTaETQYOd6b4e4Ag6
|
35
|
+
y92abGna0bmIEb4+Tx9rQ10Uijh1POzvr/VTH4bbIPy9FbKrRsIQ24qDbNJRtOpE
|
36
|
+
RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
|
37
|
+
HiLJ8VOFx6w=
|
38
|
+
-----END CERTIFICATE-----
|
39
|
+
date: 2021-10-04 00:00:00.000000000 Z
|
12
40
|
dependencies:
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
42
|
+
name: async-io
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
16
44
|
requirements:
|
17
|
-
- - "
|
45
|
+
- - ">="
|
18
46
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
47
|
+
version: '0'
|
20
48
|
type: :runtime
|
21
49
|
prerelease: false
|
22
50
|
version_requirements: !ruby/object:Gem::Requirement
|
23
51
|
requirements:
|
24
|
-
- - "
|
52
|
+
- - ">="
|
25
53
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
54
|
+
version: '0'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
56
|
+
name: ffi-module
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
|
-
- - "
|
59
|
+
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
61
|
+
version: 0.3.0
|
34
62
|
type: :runtime
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
|
-
- - "
|
66
|
+
- - "~>"
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
68
|
+
version: 0.3.0
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: async-rspec
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +95,7 @@ dependencies:
|
|
67
95
|
- !ruby/object:Gem::Version
|
68
96
|
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
98
|
+
name: bundler
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
101
|
- - ">="
|
@@ -81,7 +109,7 @@ dependencies:
|
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
112
|
+
name: covered
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
115
|
- - ">="
|
@@ -114,7 +142,6 @@ executables: []
|
|
114
142
|
extensions: []
|
115
143
|
extra_rdoc_files: []
|
116
144
|
files:
|
117
|
-
- lib/.DS_Store
|
118
145
|
- lib/db/mariadb.rb
|
119
146
|
- lib/db/mariadb/adapter.rb
|
120
147
|
- lib/db/mariadb/connection.rb
|
@@ -125,7 +152,7 @@ files:
|
|
125
152
|
- lib/db/mariadb/native/result.rb
|
126
153
|
- lib/db/mariadb/native/types.rb
|
127
154
|
- lib/db/mariadb/version.rb
|
128
|
-
homepage:
|
155
|
+
homepage: https://github.com/socketry/db-mariadb
|
129
156
|
licenses:
|
130
157
|
- MIT
|
131
158
|
metadata: {}
|
@@ -144,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
171
|
- !ruby/object:Gem::Version
|
145
172
|
version: '0'
|
146
173
|
requirements: []
|
147
|
-
rubygems_version: 3.
|
174
|
+
rubygems_version: 3.1.6
|
148
175
|
signing_key:
|
149
176
|
specification_version: 4
|
150
177
|
summary: An event-driven interface for MariaDB and MySQL servers.
|
metadata.gz.sig
ADDED
Binary file
|
data/lib/.DS_Store
DELETED
Binary file
|