API Reference
Namespaces
Modules
Classes
Events
Global
Externals

Class: NameValueStoreLarge

CIQ. NameValueStoreLarge (params)

IndexedDB-backed name/value store for large objects such as workspace snapshots. Implements the same callback interface as CIQ.NameValueStore. Requires IndexedDB; applications can configure a custom collection-capable store instead. Callers must supply storeName; missing or blank names throw "storeName is required". Object stores are created only during a database upgrade. When adding a store to an existing database, supply a higher database version or a separate database name.


new NameValueStoreLarge(params)

Parameters:
Name Type Description
params object
Properties
Name Type Argument Default Description
dbName string <optional>
"NameValueStoreLarge"
storeName string

Required object-store name.

version number <optional>
1
Since:
  • 10.5.0
  • 10.6.0 Requires callers to supply the object-store name.
Throws:

If storeName is missing or blank.

Type
Error

Methods


<static> NameValueStoreLarge#get(field, cb [, includeKeys])

Retrieves a value from the store. If include keys are supplied, queries records under field + "/". Returns an object keyed by the suffix after that prefix, with only the requested fields per record. Without include keys, this is an exact-key read only. Projection scans stored full values internally; it does not maintain a separate field index.

Parameters:
Name Type Argument Description
field string

The key to retrieve.

cb CIQ.NameValueStore~getCallback

Called with (null, value) on success or (err) on failure. Returns null for missing keys.

includeKeys Array.<string> <optional>

Fields to return per child ID for a collection query; an empty collection returns {}.

Since:
  • 10.5.0
  • 10.6.0 Supports opt-in collection queries with caller-selected fields using includeKeys.
Example
store.get("users", callback, ["name", "role"]);
store.get("users/1", callback);

<static> NameValueStoreLarge#remove(field [, cb])

Removes a field from the store.

Parameters:
Name Type Argument Description
field string

The key to remove.

cb CIQ.NameValueStore~updateCallback <optional>

Called with (null) on success or (err) on failure.

Since:
  • 10.5.0
  • 10.6.0 Reports transaction failure once, after abort.

<static> NameValueStoreLarge#set(field, value [, cb])

Stores a value in the store.

Parameters:
Name Type Argument Description
field string

The key under which the value is stored.

value string | object

The value to store.

cb CIQ.NameValueStore~updateCallback <optional>

Called with (null) on success or (err) on failure.

Since:
  • 10.5.0
  • 10.6.0 Reports transaction failure once, after abort.