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
142 143 144 145 146 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 142 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
100 101 102 103 104 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 100 def contain(_type, expr, value) Attribute[SQL::Types::Bool].( sql_expr: Sequel.pg_range(expr).contains(value) ) end |
#contained_by(_type, expr, value) ⇒ Object
106 107 108 109 110 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 106 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
136 137 138 139 140 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 136 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
118 119 120 121 122 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 118 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
112 113 114 115 116 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 112 def overlap(_type, expr, value) Attribute[SQL::Types::Bool].( sql_expr: Sequel.pg_range(expr).overlaps(value) ) end |