DittoSyncKit  1.0.0-alpha1
Public Member Functions | Properties | List of all members
Ditto.SyncKit.DittoStore Class Reference

A class encompassing functionality relating to the embedded storage. This is not a class you instantiate directly. Instead you access DittoStore objects using DittoSyncKit.Store. More...

Public Member Functions

DittoCollection Collection (string collectionName)
 A method to reference a DittoCollection. More...
 
unsafe List< DittoWriteTransactionResultWrite (Action< DittoWriteTransaction > handler)
 Allows you to group multiple operations together that affect multiple documents, potentially across multiple collections. More...
 

Properties

unsafe List< string > CollectionNames [get]
 Gets the names of all collections known about on this device. More...
 
DittoCollection this[string collectionName] [get]
 Retrieve a DittoCollection. var collection = dittoSyncKit.store["cars"]; More...
 

Detailed Description

A class encompassing functionality relating to the embedded storage. This is not a class you instantiate directly. Instead you access DittoStore objects using DittoSyncKit.Store.

Member Function Documentation

◆ Collection()

DittoCollection Ditto.SyncKit.DittoStore.Collection ( string  collectionName)
inline

A method to reference a DittoCollection.

Parameters
collectionNameThe name of the collection.
Returns
A reference to the DittoCollection.

◆ Write()

unsafe List<DittoWriteTransactionResult> Ditto.SyncKit.DittoStore.Write ( Action< DittoWriteTransaction handler)
inline

Allows you to group multiple operations together that affect multiple documents, potentially across multiple collections.

Parameters
handlerAn Action that provides access to a write transaction object that can be used to perform operations on the store.
Returns
A list ofDittoWriteTransactionResult objects. There is a result for each operation performed as part of the write transaction.

Property Documentation

◆ CollectionNames

unsafe List<string> Ditto.SyncKit.DittoStore.CollectionNames
get

Gets the names of all collections known about on this device.

Note, this will return immediately what is in the store.

◆ this[string collectionName]

DittoCollection Ditto.SyncKit.DittoStore.this[string collectionName]
get

Retrieve a DittoCollection. var collection = dittoSyncKit.store["cars"];

Parameters
collectionNameThe name of the collection.
Returns
A reference to the DittoCollection.