Module: ROM::SQL::Postgres::Types::RangeFunctions

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

Instance Method Summary collapse

Instance Method Details

#is_empty(_type, expr) ⇒ Object



162
163
164
165
166
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 162

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

#lower(_type, expr) ⇒ Object



150
151
152
153
154
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 150

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

#lower_inc(_type, expr) ⇒ Object



168
169
170
171
172
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 168

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

#lower_inf(_type, expr) ⇒ Object



180
181
182
183
184
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 180

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

#upper(_type, expr) ⇒ Object



156
157
158
159
160
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 156

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

#upper_inc(_type, expr) ⇒ Object



174
175
176
177
178
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 174

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

#upper_inf(_type, expr) ⇒ Object



186
187
188
189
190
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 186

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