db-mariadb 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a67b6bf206b453ebb0fb94ee60f27581bc6ebe6d9acdc5190e6e61b3ba35a839
4
- data.tar.gz: afca519606ee8d3125ac11c1301612dcb496d1bf93eeaec951e7162c0ff6b7fa
3
+ metadata.gz: 8b625dc4c4f14093794812d057af4aced8ca7ed30f65e5b0c6b8a0b29a6262f1
4
+ data.tar.gz: e42b0449b3609e63df290e7ff75a6c1b7319ff136641483a4428f5b6a9df0d2d
5
5
  SHA512:
6
- metadata.gz: 94b8a9d6b33e6603dfafe5b0935cb335f13c1265da97a7f814bdff5cc9cd4ca91cbfc396d8723260232f00025c2a237c34287ab765c6a4b8f8c730840a32e0e6
7
- data.tar.gz: c15bfe8bf00dfde7c022e88a737382eb4e0ceb8ece8af80a5e54eb70d5f368cfe3b500c2806d3c4f65f9ca12b61f62d720bce0c8c3fab09690cb816a40ee2afe
6
+ metadata.gz: a9bc494987c948c66a7898c404701ca2a002ae9838d4af632d638fbcde44691fd83270a6a86ec7579c52e224e1d42ebf985bbca669ad7eb4295f2f622ccf3d60
7
+ data.tar.gz: fe00875308c4d7bd14eb4966c4bb86ad1ddb7aa48e5e82e888adc0b4a93c9ece55b0328ec9e18f9ef015ac5406346f3f0e2e648e7ad3c586026757346f19448a
@@ -27,14 +27,14 @@ module DB
27
27
  LOCAL = "mysql://localhost/test"
28
28
 
29
29
  class Adapter
30
- def initialize(connection_string = LOCAL)
31
- @connection_string = connection_string
30
+ def initialize(**options)
31
+ @options = options
32
32
  end
33
33
 
34
- attr :connection_string
34
+ attr :options
35
35
 
36
36
  def call
37
- Connection.new(self.connection_string)
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
@@ -20,6 +20,6 @@
20
20
 
21
21
  module DB
22
22
  module MariaDB
23
- VERSION = "0.2.0"
23
+ VERSION = "0.2.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db-mariadb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams