Module: ROM::SQL::Postgres::Types::RangeOperators

Defined in:
lib/rom/sql/extensions/postgres/types/range.rb

Instance Method Summary collapse

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].meta(
    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].meta(
    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].meta(
    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].meta(
    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].meta(
    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].meta(
    sql_expr: Sequel.pg_range(expr).overlaps(value)
  )
end

#right_of(_type, expr, value) ⇒ Object



122
123
124
125
126
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 122

def right_of(_type, expr, value)
  Attribute[SQL::Types::Bool].meta(
    sql_expr: Sequel.pg_range(expr).right_of(value)
  )
end

#starts_after(_type, expr, value) ⇒ Object



128
129
130
131
132
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 128

def starts_after(_type, expr, value)
  Attribute[SQL::Types::Bool].meta(
    sql_expr: Sequel.pg_range(expr).starts_after(value)
  )
end