-
Notifications
You must be signed in to change notification settings - Fork 7
Record (NodeJS)
Dmitry Kochin edited this page Jun 22, 2018
·
1 revision
Record is the class to represent a database record.
let record = new Record(tablespace, table);Creates empty record from tablespace and table
-
tablespace- name of the record tablespace -
table- name of the record table
record.putField(field);Put field value to record
-
field- Field object
record.putValue(name, value, type);Puts field value using its binary representation
-
name- name of the field -
value- Buffer object (binary value) -
type- type of the field
record.putFields(fields, types);Puts several field values at once
-
fields- an object with keys - field names and values - field values -
types- an object with keys - field names and values - the corresponding field type
record.putValue(name, value, type);Puts field value using its binary representation
-
name- name of the field -
value- the field value -
type- type of the field
record.putHash(name, hash, type);Puts field hash into record. When field is not changed it is possible to supply its hash instead of the value.
-
name- name of the field -
hash- Buffer object containing field hash -
type- type of the field
let field = record.getField(name);Gets field with the specified name from the record
-
name- name of the field
Field or null
let fields = record.fields;Gets and object with keys - field names and values - Field objects
object with keys - field names and values - Field objects
- Introduction
- Notes on latest release
- Setting up a node
- Creating tablespaces and tables
- Ties.DB protocol
- TiQL - Ties.DB query language
- NodeJS client