insert_records_from_json
- insert_records_from_json(
records: string | Record<string, any> | Record<string, any>[],
table_name: string,
create_table_options?: Record<string, string>,
options?: Record<string, string>,
callback?: GPUdbCallback,
): Promise<Record<string, any>>Parameters
- records: string | Record<string, any> | Record<string, any>[]
A record, an array of records, or a JSON string
- table_name: string
Table to insert into; created if the options say so
Optionalcreate_table_options: Record<string, string>create_table_optionsfor the endpointOptionaloptions: Record<string, string>optionsfor the endpointOptionalcallback: GPUdbCallbackOptional callback function
Returns Promise<Record<string, any>>
Promise resolving to the insertion counts
Example
- Defined in src/GPUdb.ts:15937
- records: string | Record<string, any> | Record<string, any>[]
Inserts records supplied as JSON, via
/insert/records/json.Accepts a single record, an array of records, or a JSON string holding either. The endpoint takes its parameters in the query string rather than the request body, which carries the records themselves.