memorydb 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/memorydb/cursor.rb +5 -0
- data/lib/memorydb/db.rb +1 -0
- data/lib/memorydb/filter_factory.rb +5 -0
- metadata +2 -2
data/lib/memorydb/cursor.rb
CHANGED
data/lib/memorydb/db.rb
CHANGED
@@ -150,6 +150,7 @@ module MemoryDb
|
|
150
150
|
when '<='; value && (value <= filter.value)
|
151
151
|
when '>'; value && (value > filter.value)
|
152
152
|
when '>='; value && (value >= filter.value)
|
153
|
+
when 'contains'; value && value.include?(filter.value)
|
153
154
|
when 'in'; filter.value.include?(value)
|
154
155
|
when '!in'; !filter.value.include?(value)
|
155
156
|
when 'or'; filter.value.any? do |sub_filter|
|
@@ -43,6 +43,11 @@ module MemoryDb
|
|
43
43
|
Filter.new(field, 'in', value.to_a)
|
44
44
|
end
|
45
45
|
|
46
|
+
def contains(field, value)
|
47
|
+
assert_field!(field)
|
48
|
+
Filter.new(field, 'contains', value)
|
49
|
+
end
|
50
|
+
|
46
51
|
def not_in(field, value)
|
47
52
|
assert_field!(field)
|
48
53
|
assert_to_a!('Exclusion', value)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memorydb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|