class Sequel::Dataset::Query

  1. lib/sequel/extensions/query.rb
Superclass: Sequel::BasicObject

Proxy object used by Dataset#query.


Public Class

  1. new

Public Instance

  1. dataset
  2. method_missing


dataset [R]

The current dataset in the query. This changes on each method call.

Public Class methods

[show source]
   # File lib/sequel/extensions/query.rb
66 def initialize(dataset)
67   @dataset = dataset
68 end

Public Instance methods

method_missing(method, *args, &block)

Replace the query’s dataset with dataset returned by the method call.

[show source]
   # File lib/sequel/extensions/query.rb
71 def method_missing(method, *args, &block)
72   # Allow calling private methods, so things like raise works
73   @dataset = @dataset.send(method, *args, &block)
74   raise(Sequel::Error, "method #{method.inspect} did not return a dataset") unless @dataset.is_a?(Dataset)
75   self
76 end