Class: Quo::WrappedQuery

Inherits:
Query
  • Object
show all
Defined in:
lib/quo/wrapped_query.rb

Instance Attribute Summary

Attributes inherited from Query

#current_page, #options, #page_size

Instance Method Summary collapse

Methods inherited from Query

call, call!, #compose, #eager?, #exists?, #first, #first!, #group, #includes, #last, #limit, #none?, #order, #page_count, #paged?, #preload, #relation?, #results, #select, #to_a, #to_eager, #to_sql, #transform, #transform?, #unwrap, #unwrap_unpaginated

Methods included from Utilities::Compose

#composable_with?, #compose

Methods included from Utilities::Sanitize

#sanitize_sql_for_conditions, #sanitize_sql_parameter, #sanitize_sql_string

Methods included from Utilities::Wrap

#wrap

Methods included from Utilities::Callstack

#debug_callstack

Constructor Details

#initialize(wrapped_query, **options) ⇒ WrappedQuery

Returns a new instance of WrappedQuery.



5
6
7
8
# File 'lib/quo/wrapped_query.rb', line 5

def initialize(wrapped_query, **options)
  @wrapped_query = wrapped_query
  super(**options)
end

Instance Method Details

#copy(**options) ⇒ Object



10
11
12
# File 'lib/quo/wrapped_query.rb', line 10

def copy(**options)
  self.class.new(query, **@options.merge(options))
end

#queryObject



14
15
16
# File 'lib/quo/wrapped_query.rb', line 14

def query
  @wrapped_query
end