-
Notifications
You must be signed in to change notification settings - Fork 7
Field (NodeJS)
Dmitry Kochin edited this page Jun 22, 2018
·
1 revision
Field object represent database typed field. In Ties.DB field can contain name, type and either value or field hash. If you don't specify the field in RecollectionRequest, the field hash may be returned instead of field value.
let field = new Field(name, type, values);-
name- name of the field -
type- type of the field -
values- an object with one or more keys:
values = {
binaryValue: Buffer, //The binary value of the field
value: mixed, //Javascript typed value of the field
hash: Buffer //Hash of the field
}If some of the keys are absent in values they will be recreated from specified keys on demand.
let name = field.getName();Gets name of the field
let value = field.getValue();Gets js-typed value of the field
let value = field.getBinaryValue();Gets binary representation of the field value
let value = field.getHash();Gets hash of the field
field.setValue(value);Sets new value of the field
field.setValue(value);Sets new value of the field
field.setBinaryValue(valueBuffer);Sets new value of the field using its binary representation
- Introduction
- Notes on latest release
- Setting up a node
- Creating tablespaces and tables
- Ties.DB protocol
- TiQL - Ties.DB query language
- NodeJS client