Writes an array column with its values into the buffer.
Column name
Array values to write (currently supports double arrays). A null or undefined value omits the column entirely when arrays are supported; protocol v1 rejects the call for every value.
Returns with a reference to this buffer.
Closes the row after writing the designated timestamp into the buffer.
Precision rules:
'ns' (nanoseconds) are sent with full nanosecond precision.
All other timestamps are sent with microsecond precision.Designated epoch timestamp. Must be an integer or a BigInt.
Optionalunit: TimestampUnitThe time unit of the timestamp. Supported values:
'ns' — nanoseconds (requires BigInt)'us' — microseconds (default)'ms' — millisecondsReturns with a reference to this buffer.
If unit is not one of 'ns', 'us', or 'ms'.
Argument validation -- the unit and the timestamp alike -- runs before the
close touches the row, so it leaves the open row unchanged and the call
can be retried with a corrected argument.
Closes the row without writing designated timestamp into the buffer. Designated timestamp will be populated by the server on this record.
Writes a boolean column with its value into the buffer. Use it to insert into BOOLEAN columns.
Column name.
Column value, accepts only boolean values. A null or undefined value omits the column entirely (stored as NULL).
Returns with a reference to this buffer.
Returns the current position of the buffer. New data will be written into the buffer starting from this position.
The current write position in the buffer
Writes a decimal value into the buffer using its binary format.
Use it to insert into DECIMAL database columns.
Column name.
The unscaled integer portion of the decimal value.
bigint is provided, it will be converted automatically.Int8Array is provided, it must contain the two’s complement representation
of the unscaled value in big-endian byte order.Int8Array represents a NULL value.The number of fractional digits (the scale) of the decimal value.
Returns with a reference to this buffer.
Writes a decimal value into the buffer using its text format.
Use it to insert into DECIMAL database columns.
Column name.
The decimal value to write.
number or a string containing a valid decimal representation."123.45" or "-0.001").Returns with a reference to this buffer.
Writes a 64-bit floating point value into the buffer. Use it to insert into DOUBLE or FLOAT database columns.
Column name.
Column value, accepts only number values. A null or undefined value omits the column entirely (stored as NULL).
Returns with a reference to this buffer.
Writes a 64-bit signed integer into the buffer. Use it to insert into LONG, INT, SHORT and BYTE columns.
Column name.
Column value, accepts only number values. A null or undefined value omits the column entirely (stored as NULL).
Returns with a reference to this buffer.
Resets the buffer, data sitting in the buffer will be lost. In other words it clears the buffer, and sets the writing position to the beginning of the buffer.
Returns with a reference to this buffer.
Writes a string column with its value into the buffer. Use it to insert into VARCHAR and STRING columns.
Column name.
Column value, accepts only string values. A null or undefined value omits the column entirely (stored as NULL).
Returns with a reference to this buffer.
Writes a symbol name and value into the buffer. Use it to insert into SYMBOL columns.
Symbol name.
Symbol value, toString() is called to extract the actual symbol value from the parameter. A null or undefined value omits the symbol entirely (stored as NULL).
Returns with a reference to this buffer.
Writes the table name into the buffer.
Table name.
Returns with a reference to this buffer.
Writes a timestamp column and its value into the buffer.
Use this method to insert data into TIMESTAMP or TIMESTAMP_NS columns.
Precision rules:
'ns' (nanoseconds) are sent with full nanosecond precision.
All other timestamps are sent with microsecond precision.The column name.
The epoch timestamp. Must be an integer or a BigInt. A null or undefined value omits the column entirely (stored as NULL).
Optionalunit: TimestampUnitThe time unit of the timestamp. Supported values:
'ns' — nanoseconds (requires BigInt)'us' — microseconds (default)'ms' — millisecondsReturns with a reference to this buffer.
Returns a cropped buffer ready to send to the server, or null if there is nothing to send. The returned buffer is a copy of this buffer. It also compacts the buffer.
Optionalpos: numberOptional position parameter
A copy of the buffer ready to send, or null
Returns a cropped buffer, or null if there is nothing to send. The returned buffer is backed by this buffer instance, meaning the view can change as the buffer is mutated. Used only in tests to assert the buffer's content.
Optionalpos: numberOptional position parameter
A view of the buffer
Buffer used by the Sender for data serialization.
Provides methods for writing different data types into the buffer.