Ditto 1.1.8
Public Member Functions | List of all members
DittoSDK.DittoWriteTransactionPendingCursorOperation Class Reference

These objects are returned when using DittoScopedWriteTransaction.Find(string), DittoScopedWriteTransaction.Find(string, Dictionary<string, object>), or DittoScopedWriteTransaction.FindAll. More...

Public Member Functions

DittoWriteTransactionPendingCursorOperation Limit (int limit)
 Limit the number of documents that get returned when querying a collection for matching documents. More...
 
DittoWriteTransactionPendingCursorOperation Offset (uint offset)
 Offset the resulting set of matching documents. More...
 
DittoWriteTransactionPendingCursorOperation Sort (string query, DittoSortDirection direction)
 Sort the documents that match the query provided in the preceding find-like function call. More...
 
unsafe List< DittoDocumentExec ()
 Execute the query generated by the preceding function chaining and return the list of matching documents. More...
 
unsafe Dictionary< DittoDocumentID, List< DittoUpdateResult > > Update (Action< List< DittoMutableDocument > > updater)
 Update documents that match the query generated by the preceding function chaining. More...
 
unsafe List< DittoDocumentIDRemove ()
 Remove all documents that match the query generated by the preceding function chaining. More...
 
unsafe List< DittoDocumentIDEvict ()
 Evict all documents that match the query generated by the preceding function chaining. More...
 

Detailed Description

These objects are returned when using DittoScopedWriteTransaction.Find(string), DittoScopedWriteTransaction.Find(string, Dictionary<string, object>), or DittoScopedWriteTransaction.FindAll.

You can use them to perform updates on, remove, evict, or find documents.

Member Function Documentation

◆ Evict()

unsafe List< DittoDocumentID > DittoSDK.DittoWriteTransactionPendingCursorOperation.Evict ( )
inline

Evict all documents that match the query generated by the preceding function chaining.

Returns
A list containing the IDs of the documents that were evicted.

◆ Exec()

unsafe List< DittoDocument > DittoSDK.DittoWriteTransactionPendingCursorOperation.Exec ( )
inline

Execute the query generated by the preceding function chaining and return the list of matching documents.

Returns
A list of DittoDocument objects matching the query generated by the preceding function chaining.

◆ Limit()

DittoWriteTransactionPendingCursorOperation DittoSDK.DittoWriteTransactionPendingCursorOperation.Limit ( int  limit)
inline

Limit the number of documents that get returned when querying a collection for matching documents.

Parameters
limitThe maximum number of documents that will be returned.
Returns
A DittoWriteTransactionPendingCursorOperation that you can chain further function calls to.

◆ Offset()

DittoWriteTransactionPendingCursorOperation DittoSDK.DittoWriteTransactionPendingCursorOperation.Offset ( uint  offset)
inline

Offset the resulting set of matching documents.

This is useful if you aren't interested in the first N matching documents for one reason or another. For example, you might already have queried the collection and obtained the first 20 matching documents and so you might want to run the same query as you did previously but ignore the first 20 matching documents, and that is when you would use Offset(uint).

Parameters
offsetThe number of matching documents that you want the eventual resulting set of matching documents to be offset by (and thus not include).
Returns
A DittoWriteTransactionPendingCursorOperation that you can chain further function calls to.

◆ Remove()

unsafe List< DittoDocumentID > DittoSDK.DittoWriteTransactionPendingCursorOperation.Remove ( )
inline

Remove all documents that match the query generated by the preceding function chaining.

Returns
A list containing the IDs of the documents that were removed.

◆ Sort()

DittoWriteTransactionPendingCursorOperation DittoSDK.DittoWriteTransactionPendingCursorOperation.Sort ( string  query,
DittoSortDirection  direction 
)
inline

Sort the documents that match the query provided in the preceding find-like function call.

Parameters
queryThe query specifies the logic to be used when sorting the matching documents.
directionSpecify whether you want the sorting order to be ascending or descending.
Returns
A DittoWriteTransactionPendingCursorOperation that you can chain further function calls to.

◆ Update()

unsafe Dictionary< DittoDocumentID, List< DittoUpdateResult > > DittoSDK.DittoWriteTransactionPendingCursorOperation.Update ( Action< List< DittoMutableDocument > >  updater)
inline

Update documents that match the query generated by the preceding function chaining.

Parameters
updaterA block that gets called with all of the documents matching the query. The documents are DittoMutableDocument objects so you can call update-related functions on them.
Returns
A dictionary mapping document IDs to lists of DittoUpdateResult that describes the updates that were performed for each document.