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
- OPERATORS
Public Instance Methods
Source
# File lib/sequel/extensions/pg_range_ops.rb 110 def pg_range 111 self 112 end
Return the receiver.
Private Instance Methods
Source
# File lib/sequel/extensions/pg_range_ops.rb 122 def function(name) 123 Sequel::SQL::Function.new(name, self) 124 end
Return a function called with the receiver.
Source
# File lib/sequel/extensions/pg_range_ops.rb 117 def operator(type, other) 118 Sequel::SQL::BooleanExpression.new(:NOOP, Sequel::SQL::PlaceholderLiteralString.new(OPERATORS[type], [value, other])) 119 end
Create a boolen expression for the given type and argument.