-
Notifications
You must be signed in to change notification settings - Fork 7
Connection (NodeJS)
Dmitry Kochin edited this page Jul 10, 2018
·
6 revisions
You communicate to a Ties.DB node with Connection object.
let c = new Connection();await c.connect('ws://<node address>:<port>');Ties.DB protocol uses WebSocket at transport layer. So you should pass ws:// schema as connect argument.
let response = await c.modify(records, pk);-
records- array of Record objects -
pk- Buffer, containing the user's private key
Tag object containing response in Ties.DB EBML format. It is either ModificationResponse or Error tag.
You can pass several records in modification request. The records can insert or update rows. Since each request should be signed you need to pass your private key in pk argument.
let response = await c.recollect(tiql, pk);-
tiql- TiQL query -
pk- Buffer, containing the user's private key
Tag object containing response in Ties.DB EBML format. It is either RecollectionResponse or Error tag.
You can retrieve records with TiQL query. Since each request should be signed you need to pass your private key in pk argument
c.close()- Introduction
- Notes on latest release
- Setting up a node
- Creating tablespaces and tables
- Ties.DB protocol
- TiQL - Ties.DB query language
- NodeJS client