Class: Parse::Query::Subquery
- Inherits:
-
Parse::Query
- Object
- Parse::Query
- Parse::Query::Subquery
- Defined in:
- lib/parse/query.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Attributes inherited from Parse::Query
#keys, #parse_class_name, #parse_client
Instance Method Summary collapse
-
#initialize(parse_class_name = nil) ⇒ Subquery
constructor
A new instance of Subquery.
- #inspect ⇒ Object
- #key=(val) ⇒ Object (also: #key)
Methods inherited from Parse::Query
#count, #include, #limit, #order, #order_desc, #run, #skip, #to_params, #where
Constructor Details
#initialize(parse_class_name = nil) ⇒ Subquery
Returns a new instance of Subquery.
151 152 153 154 |
# File 'lib/parse/query.rb', line 151 def initialize parse_class_name=nil super @key = nil end |
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
149 150 151 |
# File 'lib/parse/query.rb', line 149 def parent @parent end |
Instance Method Details
#inspect ⇒ Object
162 163 164 165 166 167 168 169 170 |
# File 'lib/parse/query.rb', line 162 def inspect # TODO should be refactored case @parent when :select, :dont_select %Q|{"query":{"className":#{parse_class_name.to_s.inspect},"where":{#{@where.join ','}}},"key":#{@key.inspect}}| when :in_query, :not_in_query %Q|{"where":{#{@where.join ','}},"className":#{parse_class_name.to_s.inspect}}| end end |
#key=(val) ⇒ Object Also known as: key
156 157 158 159 |
# File 'lib/parse/query.rb', line 156 def key= val @key = val self end |