overlaps: key-pairs will be ored
This commit is contained in:
parent
08d1610987
commit
7229fd185c
|
@ -203,6 +203,7 @@ class SmqlToAR
|
||||||
end
|
end
|
||||||
InRange = simple_condition NotInRange, '..', '%s BETWEEN %s AND %s'
|
InRange = simple_condition NotInRange, '..', '%s BETWEEN %s AND %s'
|
||||||
|
|
||||||
|
# Every key-pair will be ORed. No multiple values possible.
|
||||||
class Overlaps < Condition
|
class Overlaps < Condition
|
||||||
Operator, Where = '<=>', '(%s, %s) OVERLAPS (%s, %s)'
|
Operator, Where = '<=>', '(%s, %s) OVERLAPS (%s, %s)'
|
||||||
Expected = [Range, lambda {|val|
|
Expected = [Range, lambda {|val|
|
||||||
|
@ -228,6 +229,7 @@ class SmqlToAR
|
||||||
end
|
end
|
||||||
|
|
||||||
def overlaps_build builder, table
|
def overlaps_build builder, table
|
||||||
|
builder = Or.new builder
|
||||||
builder.wobs (v1 = builder.vid).to_sym => @value.begin, (v2 = builder.vid).to_sym => @value.end
|
builder.wobs (v1 = builder.vid).to_sym => @value.begin, (v2 = builder.vid).to_sym => @value.end
|
||||||
v1 = "TIMESTAMP #{v1}"
|
v1 = "TIMESTAMP #{v1}"
|
||||||
v2 = "TIMESTAMP #{v2}"
|
v2 = "TIMESTAMP #{v2}"
|
||||||
|
|
Loading…
Reference in a new issue