eurydice 1.0.2-java → 1.0.3-java
Sign up to get free protection for your applications and to get access to all the features.
@@ -130,6 +130,14 @@ module Eurydice
|
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
133
|
+
def get_column_count(row_key, options={})
|
134
|
+
thrift_exception_handler do
|
135
|
+
selector = @keyspace.create_selector
|
136
|
+
column_predicate = create_column_predicate(options)
|
137
|
+
selector.get_column_count(@name, to_pelops_bytes(row_key), column_predicate, get_cl(options))
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
133
141
|
def get_indexed(column_key, operator, value, options={})
|
134
142
|
thrift_exception_handler do
|
135
143
|
selector = @keyspace.create_selector
|
data/lib/eurydice/version.rb
CHANGED
@@ -374,6 +374,27 @@ module Eurydice
|
|
374
374
|
end
|
375
375
|
end
|
376
376
|
|
377
|
+
describe '#get_column_count' do
|
378
|
+
it 'returns the number of columns in the specified row' do
|
379
|
+
@cf.insert('ABC', Hash[('a'..'z').zip(0..9 * 10)])
|
380
|
+
@cf.get_column_count('ABC').should == 26
|
381
|
+
end
|
382
|
+
|
383
|
+
it 'returns zero if the row does not exist' do
|
384
|
+
@cf.get_column_count('X').should == 0
|
385
|
+
end
|
386
|
+
|
387
|
+
it 'returns the number of columns in the specified range' do
|
388
|
+
@cf.insert('ABC', Hash[('a'..'z').zip(0..9 * 10)])
|
389
|
+
@cf.get_column_count('ABC', :columns => 'm'..'q').should == 5
|
390
|
+
end
|
391
|
+
|
392
|
+
it 'returns the number of columns after the specified column' do
|
393
|
+
@cf.insert('ABC', Hash[('a'..'z').zip(0..9 * 10)])
|
394
|
+
@cf.get_column_count('ABC', :from_column => 's').should == 8
|
395
|
+
end
|
396
|
+
end
|
397
|
+
|
377
398
|
describe '#each_column' do
|
378
399
|
before do
|
379
400
|
@cf.insert('ABC', Hash[('a'..'z').map { |a| [a, a.upcase] }.shuffle])
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: eurydice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.3
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- Theo Hultberg
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-11-
|
13
|
+
date: 2011-11-08 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: pelops-jars
|