Querying Data
-
These objects are returned when using
find
-like functionality onDITCollection
s.They allow chaining of further query-related functions to do things like add a limit to the number of documents you want returned or specify how you want the documents to be sorted and ordered.
You can either call
exec
on the object to get an array ofDITDocument
s as an immediate return value, or you can establish either a live query or a subscription, which both work over time.A live query, established by calling
observe
, will notify you every time there’s an update to a document that matches the query you provided in the precedingfind
-like call.A subscription, established by calling
subscribe
, will act as a signal to other peers that the device connects to that you would like to receive updates from them about documents that match the query you provided in the precedingfind
-like call.Calling
observe
will generate both a subscription and a live query at the same time.If you’d like to only observe local changes then you can call
observeLocal
.If you want to observe changes in such a way that you can signal when you’re ready for the live query to deliver a new update then you can call
observeWithNextSignal
orobserveLocalWithNextSignal
.Update and remove functionality is also exposed through this object.
See moreDeclaration
Objective-C
@interface DITPendingCursorOperation : NSObject
-
These objects are returned when using
findByID
functionality onDITCollection
s.You can either call
exec
on the object to get an immediate return value, or you can establish either a live query or a subscription, which both work over time.A live query, established by calling
observe
, will notify you every time there’s an update to the document with the ID you provided in the precedingfindByID
call.A subscription, established by calling
subscribe
, will act as a signal to other peers that you would like to receive updates from them about the document with the ID you provided in the precedingfindByID
call.Calling
observe
will generate both a subscription and a live query at the same time.If you’d like to only observe local changes then you can call
observeLocal
.If you want to observe changes in such a way that you can signal when you’re ready for the live query to deliver a new update then you can call
observeWithNextSignal
orobserveLocalWithNextSignal
.Update and remove functionality is also exposed through this object.
See moreDeclaration
Objective-C
@interface DITPendingIDSpecificOperation : NSObject
-
Describes the direction when sorting a query.
See moreDeclaration
Objective-C
enum DITSortDirection : NSUInteger {}