-
Notifications
You must be signed in to change notification settings - Fork 7
Tag (NodeJS)
Dmitry Kochin edited this page Jun 22, 2018
·
2 revisions
Tag is an utility class to represent Ties.DB EBML structure. The EBML structures can be returned in response to requests.
let tag = new Tag(propertiesOrName);-
propertiesOrName- if it isstringthen it should be name of the tag to be created. The name should be valid for Ties.DB EBML schema. Otherwise it can be an object with the following keys:
{
name: string, //Name of the tag from the Ties.DB EBML schema
value: mixed, //Javascript typed value of the tag
data: Buffer //binary representation of the value
}name is obligatory, value and data are optional.
let child = tag.getChild(name);Gets one immediate child of the tag with the specified name
-
name- name of the subtag to get
Tag or null if not found
let children = tag.getChildren(name);Gets all immediate children of the tag with the specified name
-
name- name of the subtags to get
Array of Tag. The array will be empty if not found
tag.addChild(name, value);
tag.addChild(tag);Adds new child to the tag
-
name- name of the subtag to add. Should be valid Ties.DB EBML schema name. -
value- value of the subtag -
tag- a Tag object to add as a subtag
- Introduction
- Notes on latest release
- Setting up a node
- Creating tablespaces and tables
- Ties.DB protocol
- TiQL - Ties.DB query language
- NodeJS client