db-mariadb 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/db/mariadb/adapter.rb +4 -4
- data/lib/db/mariadb/connection.rb +12 -0
- data/lib/db/mariadb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b625dc4c4f14093794812d057af4aced8ca7ed30f65e5b0c6b8a0b29a6262f1
|
4
|
+
data.tar.gz: e42b0449b3609e63df290e7ff75a6c1b7319ff136641483a4428f5b6a9df0d2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9bc494987c948c66a7898c404701ca2a002ae9838d4af632d638fbcde44691fd83270a6a86ec7579c52e224e1d42ebf985bbca669ad7eb4295f2f622ccf3d60
|
7
|
+
data.tar.gz: fe00875308c4d7bd14eb4966c4bb86ad1ddb7aa48e5e82e888adc0b4a93c9ece55b0328ec9e18f9ef015ac5406346f3f0e2e648e7ad3c586026757346f19448a
|
data/lib/db/mariadb/adapter.rb
CHANGED
@@ -27,14 +27,14 @@ module DB
|
|
27
27
|
LOCAL = "mysql://localhost/test"
|
28
28
|
|
29
29
|
class Adapter
|
30
|
-
def initialize(
|
31
|
-
@
|
30
|
+
def initialize(**options)
|
31
|
+
@options = options
|
32
32
|
end
|
33
33
|
|
34
|
-
attr :
|
34
|
+
attr :options
|
35
35
|
|
36
36
|
def call
|
37
|
-
Connection.new(
|
37
|
+
Connection.new(**@options)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -85,6 +85,18 @@ module DB
|
|
85
85
|
def next_result
|
86
86
|
@native.next_result
|
87
87
|
end
|
88
|
+
|
89
|
+
def call(statement, streaming: false)
|
90
|
+
@native.send_query(statement)
|
91
|
+
|
92
|
+
last_result = nil
|
93
|
+
|
94
|
+
while result = @native.next_result
|
95
|
+
last_result = result
|
96
|
+
end
|
97
|
+
|
98
|
+
return last_result
|
99
|
+
end
|
88
100
|
end
|
89
101
|
end
|
90
102
|
end
|
data/lib/db/mariadb/version.rb
CHANGED