Ziggy - Services and Product Help

Data Store

The Data Store is a very simple key/value data store that lives in the main Ziggy database. It is not intended for very large scale situations, although it can handle reasonably large volumes of data.

You can always integrate other 3rd part databases or more specialised data store solutions using NPM modules. Please contact us if you require advice on these.

Name and Key

The data store is a Key/Value store but it also provides an additional field name so you can create a namespace for your data.

The combination of name + key must be unique within the store.

Data Store Block

The Data Store Block gives you access to Data Store operations without the need to write any Javascript code.

Click here to see an example Flow that uses the Data Store Block.

Javascript API

You can also perform Data Store operations from the Javascript Block. The following methods are available.

Important: all methods are asynchronous.

Method

Description

fetch(fetchProps)

Retrieve keys using fetchProps whose type definition is { limit: maximum records to retrieve, offset: offset from start , flowUuid?: flow's unique id, key?: keyname, name?: namespace name, data?: search for data (currently exact match only) }

  • key: a globally unique key

  • value: any data

  • timeoutUnit: "seconds"|"minutes"|"hours"|"days"|"never"

  • timeoutValue: timeout value in the units specified by timeoutUnit

async findName(name: string, limit: number, offset: number) { return this.storeRepo.findName(name, limit, offset) }

Retrieve all keys within the specified namespace.

  • limit: maximum keys to retrieve

  • offset: relative to this offset value

findNameKey(name: string, key: string)

Retrieve the specified key within the specified namespace.

  • name: namespace

  • key: key

insert(name: string, key: string, data: any)

Insert a new key into the specified namespace. Will error isf the namespace+key combination already exists.

  • name: namespace

  • key: key

upsert(name: string, key: string, data: any)

Insert a new key into the specified namespace if it doesn't exist, update if it does.

  • name: namespace

  • key: key

updateOneNameKey(name: string, key: string, data: any) {

Update a key/value pair in the specified namespace.

  • name: namespace

  • key: key

  • data: data to store

deleteOneNameKey(name: string, key: string) {

delete a key/value pair in the specified namespace.

  • name: namespace

  • key: key

Data Store browser

You can browse and search for data in the Data Store using the Store Browser.

Last modified: 10 February 2025