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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15e56a0b92baec716e393ca41924d4a4aa90416821d8487bc02673142d1ed9d4
4
- data.tar.gz: d4cbaa125adf5ea621cc70ae1e7161a77a9923fbcd7c48a770ca86632e578baa
3
+ metadata.gz: ad8645e63c269d03c3503158ed9bbca82dc4d4c6fa0eb189dcdc2e1fa7d17605
4
+ data.tar.gz: d4e4a3ed0dc4ddc044190ac5fb0483221c97825b1f60371bd8fc5707afb24e45
5
5
  SHA512:
6
- metadata.gz: 432dffb6cf3656f9a7e4d55654cee51bf4f7fd7453a700d7c58cf429621ebd4cc71d86a851755eceb278df8135c64e208857ab7a45647c5c32565534e85ceccd
7
- data.tar.gz: 0b6d0cb0da0d93decaafbc5fa0e96f29df546f6b865edbc11e9d9290de6bddc11c0cf6e169b649e0ea2fbf2ee0909e5830eafbf8d5e5ff510d518a6cd11409df
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:
@@ -20,6 +20,6 @@
20
20
 
21
21
  module DB
22
22
  module Postgres
23
- VERSION = "0.1.3"
23
+ VERSION = "0.2.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db-postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams