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 +4 -4
- data/cassandra-helpers.gemspec +1 -1
- data/lib/cassandra-helpers.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1aec5d3fd3dc1c1fc18d8f16d89d9e2f5eceaafe0350244bbc99377ed173613
|
4
|
+
data.tar.gz: 90647a6bf1548d33c50035c48bc502103de2349a3506e1293dddda15bd588c91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: babf45c833019bc66a8cce544bfd6630d4113e372399c77fc911de0c5d12aa7f5cb73d92da673fd4919255689e47cf08981b2d6a8e34ca29b8b42452dd16970e
|
7
|
+
data.tar.gz: c12ce43f29c97cd2c072cb7c8da99ec23675e0c99c1240082b087c6320bfa2e508ec0e86f6e54ac2d5e7a53ab0edcbd795a68e31f7139a0605576a160d9d6d6c
|
data/cassandra-helpers.gemspec
CHANGED
data/lib/cassandra-helpers.rb
CHANGED
@@ -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.
|
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:
|
11
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cassandra-driver
|