A result row from a CouchbaseLite view query.
Full-text and geo queries return subclasses – see CBLFullTextQueryRow and CBLGeoQueryRow.
◆ keyAtIndex:()
| - (nullable id) keyAtIndex: |
|
(NSUInteger) |
index |
|
If this row's key is an array, returns the item at that index in the array.
If the key is not an array, index=0 will return the key itself. If the index is out of range, returns nil.
◆ CBLArrayOf()
Returns all conflicting revisions of the document, as an array of CBLSavedRevision, or nil if the document is not in conflict.
The first object in the array will be the default "winning" revision that shadows the others. This is only valid in an allDocuments query whose allDocsMode is set to kCBLShowConflicts or kCBLOnlyConflicts; otherwise it returns nil.
◆ NS_UNAVAILABLE()
| - (instancetype) NS_UNAVAILABLE |
|
|
|
◆ key
The row's key: this is the first parameter passed to the emit() call that generated the row.
◆ value
The row's value: this is the second parameter passed to the emit() call that generated the row.
◆ documentID
The ID of the document described by this view row.
This is not necessarily the same as the document that caused this row to be emitted; see the discussion of the .sourceDocumentID property for details.
◆ sourceDocumentID
| - (NSString*) sourceDocumentID |
|
readatomicassign |
The ID of the document that caused this view row to be emitted.
This is the value of the "id" property of the JSON view row. It will be the same as the .documentID property, unless the map function caused a related document to be linked by adding an "_id" key to the emitted value; in this case .documentID will refer to the linked document, while sourceDocumentID always refers to the original document. In a reduced or grouped query the value will be nil, since the rows don't correspond to individual documents.
◆ documentRevisionID
| - (NSString*) documentRevisionID |
|
readatomicassign |
The revision ID of the document this row was mapped from.
◆ database
◆ document
The document this row was mapped from.
This will be nil if a grouping was enabled in the query, because then the result rows don't correspond to individual documents.
◆ documentProperties
| - (CBLJSONDict*) documentProperties |
|
readatomicassign |
The properties of the document this row was mapped from.
To get this, you must have set the .prefetch property on the query; else this will be nil. (You can still get the document properties via the .document property, of course. But it takes a separate call to the database. So if you're doing it for every row, using .prefetch and .documentProperties is faster.)
◆ key0
Convenience for use in keypaths.
Returns the key at the given index.
◆ key1
◆ key2
◆ key3
◆ sequenceNumber
| - (UInt64) sequenceNumber |
|
readatomicassign |
The database sequence number of the associated doc/revision.
The documentation for this class was generated from the following file: