db-postgres 0.1.3 → 0.2.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/postgres/connection.rb +0 -6
- data/lib/db/postgres/native/connection.rb +6 -0
- data/lib/db/postgres/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: ad8645e63c269d03c3503158ed9bbca82dc4d4c6fa0eb189dcdc2e1fa7d17605
|
4
|
+
data.tar.gz: d4e4a3ed0dc4ddc044190ac5fb0483221c97825b1f60371bd8fc5707afb24e45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aaa5eb85a4486026a845d24378c3a125edb305e5533e2dcad5d2658395c42ed6da98cc6a393b83d81bf08fb9fbd69b5a834fce41d298a20e5daf254bcc5762f
|
7
|
+
data.tar.gz: 87d33e1a8549824e60fcee9b7301157393f2fe8dcb1424d81c2ad707ffb2c3ec11c5fb44ffb51d82bb10e91219d1382bcfa216f1746e84f9cbda411385bf7e4e
|
@@ -27,12 +27,6 @@ require_relative 'native/connection'
|
|
27
27
|
|
28
28
|
module DB
|
29
29
|
module Postgres
|
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 underlying
|
37
31
|
class Connection < Async::Pool::Resource
|
38
32
|
def initialize(**options)
|
@@ -96,6 +96,12 @@ module DB
|
|
96
96
|
attach_function :escape_literal, :PQescapeLiteral, [:pointer, :string, :size_t], :pointer
|
97
97
|
attach_function :escape_identifier, :PQescapeIdentifier, [:pointer, :string, :size_t], :pointer
|
98
98
|
|
99
|
+
module IO
|
100
|
+
def self.new(fd, mode)
|
101
|
+
Async::IO::Generic.new(::IO.new(fd, mode, autoclose: false))
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
99
105
|
class Connection < FFI::Pointer
|
100
106
|
def self.connect(io: IO, types: DEFAULT_TYPES, **options)
|
101
107
|
# Prefer 'database' key for 'dbname' parameter:
|
data/lib/db/postgres/version.rb
CHANGED