insert
inline suspend fun insert(body: JsonArray, request: InsertRequestBuilder.() -> Unit = {}): PostgrestResult(source)
Executes an insert operation on the table
Parameters
body
The request body as an array of json object.
request
Additional filtering to apply to the query
Throws
if receiving an error response
Http Request Timeout Exception
if the request timed out
Http Request Exception
on network related issues
inline suspend fun <T : Any> insert(values: List<T>, request: InsertRequestBuilder.() -> Unit = {}): PostgrestResult(source)
Executes an insert operation on the table
Parameters
values
The values to insert, will automatically get serialized into json.
request
Additional filtering to apply to the query
Throws
if receiving an error response
Http Request Timeout Exception
if the request timed out
Http Request Exception
on network related issues
inline suspend fun <T : Any> insert(value: T, request: InsertRequestBuilder.() -> Unit = {}): PostgrestResult(source)
Executes an insert operation on the table
Parameters
value
The value to insert, will automatically get serialized into json.
request
Additional filtering to apply to the query
Throws
if receiving an error response
Http Request Timeout Exception
if the request timed out
Http Request Exception
on network related issues