Skip to content

Methods

insert

Inserts one or more records into a table. This is a convenience wrapper that runs INSERT INTO <table> <data_json>;.

Method Syntax
client.insert(table, data_json, session, txn)

Argument

Description

table

The table to insert into.

data_json

A single record or an array of records, as a JSON string.

session

An optional session id.

txn

An optional transaction id.

var resp = client.insert("person", '[{ "name": "Alice" }, { "name": "Bob" }]')
INSERT INTO $table $data_json;

Was this page helpful?