cassandra-helpers 0.1.1 → 0.1.2

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: 1d41d12e68e374a2c130e10a148f3bc8850835f4a85ac36fcdf1b878c3805172
4
- data.tar.gz: 466f3b645002c4024c95ef640b86b3d5b54eef4e3eae1eb03221c0ebd8be8c61
3
+ metadata.gz: c1aec5d3fd3dc1c1fc18d8f16d89d9e2f5eceaafe0350244bbc99377ed173613
4
+ data.tar.gz: 90647a6bf1548d33c50035c48bc502103de2349a3506e1293dddda15bd588c91
5
5
  SHA512:
6
- metadata.gz: d6cc3059ae14267cc5058a3eeaacf15af4cb326546515d6704995f27f148767806d79756a204d4f1690e21185745422155487ec260e96345abb87b8a5c452c9a
7
- data.tar.gz: 6ac7a000ba60708d6a6087b0380c45355b841b723b69a19030e33f9ebd37361cb0689737a7be6f4d4aea466649db7866d01eccabdc6aa72b617028b1f54c00c3
6
+ metadata.gz: babf45c833019bc66a8cce544bfd6630d4113e372399c77fc911de0c5d12aa7f5cb73d92da673fd4919255689e47cf08981b2d6a8e34ca29b8b42452dd16970e
7
+ data.tar.gz: c12ce43f29c97cd2c072cb7c8da99ec23675e0c99c1240082b087c6320bfa2e508ec0e86f6e54ac2d5e7a53ab0edcbd795a68e31f7139a0605576a160d9d6d6c
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'cassandra-helpers'
5
- s.version = '0.1.1'
5
+ s.version = '0.1.2'
6
6
  s.licenses = ['MIT']
7
7
  s.summary = 'Cassandra Helper Methods'
8
8
  s.description = 'Utility methods for working with Cassandra'
@@ -49,7 +49,7 @@ module CassandraHelpers
49
49
 
50
50
  def find_record(session, table, keys)
51
51
  cql = "SELECT * FROM #{Cassandra::Util.escape_name(table.name)} WHERE "
52
- cql += table.primary_key.map { |key| "#{Cassandra::Util.escape_name(key.name)} = #{Cassandra::Util.encode_object(keys[key.name])}" }.join(' AND ')
52
+ cql += table.primary_key.map { |key| keys[key.name] ? "#{Cassandra::Util.escape_name(key.name)} = #{Cassandra::Util.encode_object(keys[key.name])}" : nil }.compact.join(' AND ')
53
53
  execute_query(session, cql)
54
54
  end
55
55
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cassandra-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-19 00:00:00.000000000 Z
11
+ date: 2020-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cassandra-driver