Exposes functionality that allows you to perform multiple operations on the store within a single write transaction.
More...
|
string | CollectionName [get] |
| Gets the name of the collection that the scoped write transaction is scoped to. More...
|
|
Exposes functionality that allows you to perform multiple operations on the store within a single write transaction.
A DittoScopedWriteTransaction
is scoped to a specific collection, obtained by calling DittoWriteTransaction.Scoped(string).
◆ Find()
Creates a cursor for the documents in this collection that match the provided query.
- Parameters
-
query | A ditto query string. |
- Returns
- A cursor for the query.
◆ FindAll()
Creates a cursor for all of the documents in this collection.
- Returns
- A cursor for all documents in the collection.
◆ FindById()
Creates an accessor for a single document by its unique identifier.
- Parameters
-
id | The id of the document in this collection. |
- Returns
- A cursor for a single document.
◆ Insert()
unsafe string DittoSharp.DittoScopedWriteTransaction.Insert |
( |
Dictionary< string, object > |
data, |
|
|
string |
id = null , |
|
|
bool |
isDefault = false |
|
) |
| |
|
inline |
Inserts a document into a collection.
- Parameters
-
data | The document content. |
id | The primary key or identifier for this document. If this is null then DittoKit will assign it a unique identifier. This cannot be changed once inserted. |
isDefault | Set to true if the document should assume all values are default. See https://docs.ditto.live/concepts/data-model. |
- Returns
- The unique identifier of the document.
◆ CollectionName
string DittoSharp.DittoScopedWriteTransaction.CollectionName |
|
get |
Gets the name of the collection that the scoped write transaction is scoped to.