class Sequel::Dataset::Query

Proxy object used by Dataset#query.

Attributes

dataset[R]

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

Public Class Methods

new(dataset) click to toggle source
   # File lib/sequel/extensions/query.rb
66 def initialize(dataset)
67   @dataset = dataset
68 end

Public Instance Methods

method_missing(method, *args, &block) click to toggle source

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

   # 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