db-mariadb 0.2.4 → 0.3.0
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/connection.rb +0 -6
- data/lib/db/mariadb/native/connection.rb +6 -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: d18fa619ccfc3b043299790a3e6a275670ce48614304355e3f75ba5ed1cdc202
|
4
|
+
data.tar.gz: eb9e90465532de40869b545c1a65158136e2efbedeff6440f061c4f45d486e8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec5a4ceca8186959f19019e92cc77a53e945e4834f2c7776d60b78688c32d5f614e243a868b19f584e93c70bd8c19360525a1e2b11d9b597a37a83ae247e239b
|
7
|
+
data.tar.gz: 65b204be2c1c3f4dfa24f114246a2ec32913aceb580c7be40333aafe8c89a5680098612fae30136f8d537821d246ae9bf508def1f367d57db9c0bb59f767bd82
|
@@ -27,12 +27,6 @@ require_relative 'native/connection'
|
|
27
27
|
|
28
28
|
module DB
|
29
29
|
module MariaDB
|
30
|
-
module IO
|
31
|
-
def self.new(fd, mode)
|
32
|
-
Async::IO::Generic.new(::IO.new(fd, mode, autoclose: false))
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
30
|
# This implements the interface between the underyling native interface interface and "standardised" connection interface.
|
37
31
|
class Connection < Async::Pool::Resource
|
38
32
|
def initialize(**options)
|
@@ -63,6 +63,12 @@ module DB
|
|
63
63
|
|
64
64
|
attach_function :mysql_real_escape_string, [:pointer, :pointer, :string, :size_t], :size_t
|
65
65
|
|
66
|
+
module IO
|
67
|
+
def self.new(fd, mode)
|
68
|
+
Async::IO::Generic.new(::IO.new(fd, mode, autoclose: false))
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
66
72
|
class Connection < FFI::Pointer
|
67
73
|
def self.connect(io: IO, host: 'localhost', user: nil, password: nil, database: nil, port: 0, unix_socket: nil, client_flags: 0, compression: false, types: DEFAULT_TYPES, **options)
|
68
74
|
pointer = Native.mysql_init(nil)
|
data/lib/db/mariadb/version.rb
CHANGED