Class: Google::Cloud::Firestore::QuerySnapshot
- Inherits:
- 
      Object
      
        - Object
- Google::Cloud::Firestore::QuerySnapshot
 
- Defined in:
- lib/google/cloud/firestore/query_snapshot.rb
Overview
QuerySnapshot
A query snapshot object is an immutable representation of query results, including chnages from the previous snapshot.
Instance Method Summary collapse
- 
  
    
      #changes  ⇒ Array<DocumentChange> 
    
    
      (also: #doc_changes, #document_changes)
    
  
  
  
  
  
  
  
  
  
    The document change objects for the query snapshot. 
- 
  
    
      #docs  ⇒ Array<DocumentSnapshot> 
    
    
      (also: #documents)
    
  
  
  
  
  
  
  
  
  
    The documents in the snapshot. 
- 
  
    
      #empty?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    Determines whether query results exists. 
- 
  
    
      #query  ⇒ Query 
    
    
  
  
  
  
  
  
  
  
  
    The query producing this snapshot. 
- 
  
    
      #read_at  ⇒ Time 
    
    
      (also: #read_time)
    
  
  
  
  
  
  
  
  
  
    The time at which the snapshot was read. 
- 
  
    
      #size  ⇒ Integer 
    
    
      (also: #count)
    
  
  
  
  
  
  
  
  
  
    Returns the number of documents in this query snapshot. 
Instance Method Details
#changes ⇒ Array<DocumentChange> Also known as: doc_changes, document_changes
The document change objects for the query snapshot.
| 73 74 75 | # File 'lib/google/cloud/firestore/query_snapshot.rb', line 73 def changes @changes end | 
#docs ⇒ Array<DocumentSnapshot> Also known as: documents
The documents in the snapshot.
| 63 64 65 | # File 'lib/google/cloud/firestore/query_snapshot.rb', line 63 def docs @docs end | 
#empty? ⇒ Boolean
Determines whether query results exists.
| 94 95 96 | # File 'lib/google/cloud/firestore/query_snapshot.rb', line 94 def empty? docs.empty? end | 
#query ⇒ Query
The query producing this snapshot.
| 54 55 56 | # File 'lib/google/cloud/firestore/query_snapshot.rb', line 54 def query @query end | 
#read_at ⇒ Time Also known as: read_time
The time at which the snapshot was read.
| 103 104 105 | # File 'lib/google/cloud/firestore/query_snapshot.rb', line 103 def read_at @read_at end | 
#size ⇒ Integer Also known as: count
Returns the number of documents in this query snapshot.
| 84 85 86 | # File 'lib/google/cloud/firestore/query_snapshot.rb', line 84 def size docs.size end |