Module: ROM::SQL::Postgres::Types::RangeOperators
- Defined in:
- lib/rom/sql/extensions/postgres/types/range.rb
Instance Method Summary collapse
- #adjacent_to(_type, expr, value) ⇒ Object
- #contain(_type, expr, value) ⇒ Object
- #contained_by(_type, expr, value) ⇒ Object
- #ends_before(_type, expr, value) ⇒ Object
- #left_of(_type, expr, value) ⇒ Object
- #overlap(_type, expr, value) ⇒ Object
- #right_of(_type, expr, value) ⇒ Object
- #starts_after(_type, expr, value) ⇒ Object
Instance Method Details
#adjacent_to(_type, expr, value) ⇒ Object
140 141 142 143 144 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 140 def adjacent_to(_type, expr, value) Attribute[SQL::Types::Bool].( sql_expr: Sequel.pg_range(expr).adjacent_to(value) ) end |
#contain(_type, expr, value) ⇒ Object
98 99 100 101 102 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 98 def contain(_type, expr, value) Attribute[SQL::Types::Bool].( sql_expr: Sequel.pg_range(expr).contains(value) ) end |
#contained_by(_type, expr, value) ⇒ Object
104 105 106 107 108 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 104 def contained_by(_type, expr, value) Attribute[SQL::Types::Bool].( sql_expr: Sequel.pg_range(expr).contained_by(value) ) end |
#ends_before(_type, expr, value) ⇒ Object
134 135 136 137 138 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 134 def ends_before(_type, expr, value) Attribute[SQL::Types::Bool].( sql_expr: Sequel.pg_range(expr).ends_before(value) ) end |
#left_of(_type, expr, value) ⇒ Object
116 117 118 119 120 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 116 def left_of(_type, expr, value) Attribute[SQL::Types::Bool].( sql_expr: Sequel.pg_range(expr).left_of(value) ) end |
#overlap(_type, expr, value) ⇒ Object
110 111 112 113 114 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 110 def overlap(_type, expr, value) Attribute[SQL::Types::Bool].( sql_expr: Sequel.pg_range(expr).overlaps(value) ) end |