enrichment_db 0.1.9 → 0.1.10

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
  SHA1:
3
- metadata.gz: 7e8dd7b601167b11adfa5e7b2c98e87bdbfee1a4
4
- data.tar.gz: 1ff9d2e62fde97e39b1770675f0bf302435f8d5d
3
+ metadata.gz: ced6e9cc62c6dd68ec83db0abe2684b6c3c4535a
4
+ data.tar.gz: 0f1fcffaef04c8d30c74f73892b0893379ada295
5
5
  SHA512:
6
- metadata.gz: 9b2da15a0531f695a7373d20b9dcad947fb6df9ae61a44b80490a27983e06a37acffd1cff07ed5b52f60d963ff683f74cbc14af3c69a019125ea638059e8c348
7
- data.tar.gz: 376b8cdfb155705ad7163de5f96c21701c8e624bf4ecbda9d2021da8c64a6911c15012139fe22a69b2950ce22342154103ed9c9bc3fd8a3cc0cd0e6d63f49603
6
+ metadata.gz: aac6db9cd446762db07c085673c20d3953995c09c749dfaa8829061440b5ac6a1ed30dd25379f719712e80b0bb6c70dec5822d28128f6aeca9cd46e61948b490
7
+ data.tar.gz: 07e674766a38fb0f94344f0e8400e745a79a0823fe2b198a8c9ec20a2f764eb94856c6a3495d726010bc64ebe1104fa496ef6ba7bed4499a6c4ac7dd0eef89a0
data/lib/enrichment_db.rb CHANGED
@@ -38,6 +38,17 @@ module EnrichmentDb
38
38
 
39
39
  format_result(result)
40
40
  end
41
+
42
+ def self.by_lambda(schema_name, table_name, condition)
43
+ puts "Finding object from #{table_name} with condition #{condition}."
44
+ query = "SELECT * FROM #{schema_name}.#{table_name} where #{condition}"
45
+
46
+ result = EnrichmentDb.request(schema_name, query).collect do |record|
47
+ record
48
+ end
49
+
50
+ format_result(result)
51
+ end
41
52
 
42
53
  def self.all(table_name, schema_name = nil)
43
54
  schema_name = schema_name || self::DATABASE_NAME
@@ -1,14 +1,4 @@
1
1
  require 'helper'
2
2
 
3
3
  class EnrichmentDb::Datum < EnrichmentDb::DatumModel
4
- def self.by_lambda(schema_name, table_name, condition)
5
- puts "Finding object from #{table_name} with condition #{condition}."
6
- query = "SELECT * FROM #{schema_name}.#{table_name} where #{condition}"
7
-
8
- result = EnrichmentDb.request(schema_name, query).collect do |record|
9
- record
10
- end
11
-
12
- format_result(result)
13
- end
14
4
  end
@@ -1,3 +1,3 @@
1
1
  module EnrichmentDb
2
- VERSION = '0.1.9'
2
+ VERSION = '0.1.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enrichment_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Wallis