Transactional version of LDDataSourceUpdates with support for applyChanges

Hierarchy

Methods

  • Parameters

    • basis: boolean

      If true, completely overwrites the current contents of the data store with the provided data. If false, upserts the items in the provided data. Upserts are made only if provided items have newer versions than existing items.

    • data: LDFeatureStoreDataStorage

      An object in which each key is the "namespace" of a collection (e.g. "features") and the value is an object that maps keys to entities. The actual type of this parameter is interfaces.FullDataSet<VersionedData>.

    • callback: (() => void)

      Will be called after the changes are applied.

        • (): void
        • Returns void

    • Optional initMetadata: InitMetadata

      Optional metadata to initialize the data source with.

      Optional
    • Optional selector: String

      opaque string that uniquely identifies the state that contains the changes

      Optional

    Returns void

  • Completely overwrites the current contents of the data store with a set of items for each collection.

    Parameters

    • allData: LDFeatureStoreDataStorage

      An object in which each key is the "namespace" of a collection (e.g. "features") and the value is an object that maps keys to entities. The actual type of this parameter is interfaces.FullDataSet<VersionedData>.

    • callback: (() => void)

      Will be called when the store has been initialized.

        • (): void
        • Returns void

    • Optional initMetadata: InitMetadata

      Optional metadata to initialize the data source with.

      Optional

    Returns void

  • Updates or inserts an item in the specified collection. For updates, the object will only be updated if the existing version is less than the new version.

    Parameters

    • kind: DataKind

      The type of data to be accessed. The actual type of this parameter is interfaces.DataKind.

    • data: LDKeyedFeatureStoreItem

      The contents of the entity, as an object that can be converted to JSON. The store should check the version property of this object, and should not overwrite any existing data if the existing version is greater than or equal to that value. The actual type of this parameter is interfaces.VersionedData.

    • callback: (() => void)

      Will be called after the upsert operation is complete.

        • (): void
        • Returns void

    Returns void

Generated using TypeDoc