Sha256: 54b3d60753bf38cafa12324f8c823e59f59718bc1ea886645718e96858f35381
Contents?: true
Size: 557 Bytes
Versions: 10
Compression:
Stored size: 557 Bytes
Contents
require_relative 'temporal_node' module ConceptQL module Nodes class During < TemporalNode def where_clause if inclusive? Sequel.expr(Sequel.expr(Proc.new { r__start_date <= l__start_date}).&(Sequel.expr( Proc.new { l__start_date <= r__end_date }))) .|(Sequel.expr(Proc.new { r__start_date <= l__end_date}).&(Sequel.expr( Proc.new { l__end_date <= r__end_date }))) else [Proc.new { r__start_date <= l__start_date}, Proc.new { l__end_date <= r__end_date }] end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems