class Sequel::Postgres::RangeOp

The RangeOp class is a simple container for a single object that defines methods that yield Sequel expression objects representing PostgreSQL range operators and functions.

Most methods in this class are defined via metaprogramming, see the pg_range_ops extension documentation for details on the API.

Constants

FUNCTIONS
OPERATORS

Public Instance Methods

pg_range() click to toggle source

Return the receiver.

# File lib/sequel/extensions/pg_range_ops.rb, line 95
def pg_range
  self
end

Private Instance Methods

function(name) click to toggle source

Return a function called with the receiver.

# File lib/sequel/extensions/pg_range_ops.rb, line 107
def function(name)
  Sequel::SQL::Function.new(name, self)
end
operator(type, other) click to toggle source

Create a boolen expression for the given type and argument.

# File lib/sequel/extensions/pg_range_ops.rb, line 102
def operator(type, other)
  Sequel::SQL::BooleanExpression.new(:NOOP, Sequel::SQL::PlaceholderLiteralString.new(OPERATORS[type], [value, other]))
end