A set of configuration settings to control the client.
Creates a new model instance in the given store.
the ID of the database
The human-readable name of the model to use.
An array of model instances as JSON/JS objects.
Deletes an existing model instance from the given store.
the ID of the database
The human-readable name of the model to use.
An array of instance ids to delete.
find queries the store for entities matching the given query parameters.
the ID of the database
The human-readable name of the model to use.
The object that describes the query. User Query class or primitive QueryJSON type.
findByID queries the store for the id of an instance.
the ID of the database
The human-readable name of the model to use.
The id of the instance to search for.
getDBInfo returns invite 'links' unseful for inviting other peers to join a given store/thread.
the ID of the database
has checks whether a given instance exists in the given store.
the ID of the database
The human-readable name of the model to use.
An array of instance ids to check for.
listen opens a long-lived connection with a remote node, running the given callback on each new update to the given instance.
The return value is a close
function, which cleanly closes the connection with the remote node.
the ID of the database
contains an array of Filters
The callback to call on each update to the given instance.
newCollection registers a new model schema under the given name on the remote node. The schema must be a valid json-schema.org schema, and can be a JSON string or Javascript object.
the ID of the database
The human-readable name for the model.
The actual json-schema.org compatible schema object.
newDB creates a new store on the remote node.
the ID of the database
newDBFromAddr initializes the client with the given store, connecting to the given
thread address (database). It should be called before any operation on the store, and is an
alternative to start, which creates a local store. newDBFromAddr should also include the
read and follow keys, which should be Buffer, Uint8Array or base58-encoded strings.
See getDBInfo
for a possible source of the address and keys.
The address for the thread with which to connect.
Should be of the form /ip4/<url/ip-address>/tcp/
The set of keys to use to connect to the database
An array of Name and JSON Schemas for collections in the DB.
readTransaction creates a new read-only transaction object. See ReadTransaction for details.
the ID of the database
The human-readable name of the model to use.
Saves changes to an existing model instance in the given store.
the ID of the database
The human-readable name of the model to use.
An array of model instances as JSON/JS objects. Each model instance must have a valid existing ID
property.
writeTransaction creates a new writeable transaction object. See WriteTransaction for details.
the ID of the database
The human-readable name of the model to use.
version is the release version.
Client is a web-gRPC wrapper client for communicating with a webgRPC-enabled Textile server. This client library can be used to interact with a local or remote Textile gRPC-service It is a wrapper around Textile's 'DB' API, which is defined here: https://github.com/textileio/go-threads/blob/master/api/pb/api.proto.