db-postgres 0.5.1 → 0.5.2
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 +4 -4
- data/lib/db/postgres/native/result.rb +13 -2
- 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: cf6b2560d3bc8cc9b355b8e316eac4cf5c85fc9e134ee78aa3a36284e773ef4a
|
|
4
|
+
data.tar.gz: e69437b200e76fe8e16e96d73cc674f8f632ac468bcc328badbce3fa91046194
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 971db1d0d40d8817e6169c1d090f98fd1ddb6b4e2dcb0c5b7ee7cd05ddcbb065d54fe1ec243635cbc53a83b4b0f2c0e18328193b1b20481fb1adc1b370944a3c
|
|
7
|
+
data.tar.gz: de60cce07b7cadc009344fe4cb370978b741c2f99c2485adc24f88147c4b59171f96a133490c511b9bccd43a104536f971a3f59fe43f02000a8f858322a8bb82
|
|
@@ -54,8 +54,6 @@ module DB
|
|
|
54
54
|
ffi_attach_function :PQfreemem, [:pointer], :void, as: :free_memory
|
|
55
55
|
|
|
56
56
|
class Result < FFI::Pointer
|
|
57
|
-
include Enumerable
|
|
58
|
-
|
|
59
57
|
def initialize(connection, types = {}, address)
|
|
60
58
|
super(address)
|
|
61
59
|
|
|
@@ -101,6 +99,19 @@ module DB
|
|
|
101
99
|
Native.clear(self)
|
|
102
100
|
end
|
|
103
101
|
|
|
102
|
+
def map(&block)
|
|
103
|
+
results = []
|
|
104
|
+
|
|
105
|
+
self.each do |row|
|
|
106
|
+
results << yield row
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
return results
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def to_a
|
|
113
|
+
end
|
|
114
|
+
|
|
104
115
|
protected
|
|
105
116
|
|
|
106
117
|
def get_value(row, field)
|
data/lib/db/postgres/version.rb
CHANGED