PostgrestQueryBuilder

class PostgrestQueryBuilder(val postgrest: Postgrest, val table: String, val schema: String = postgrest.config.defaultSchema)(source)

The main class to build a postgrest request

Constructors

Link copied to clipboard
constructor(postgrest: Postgrest, table: String, schema: String = postgrest.config.defaultSchema)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline suspend fun delete(request: PostgrestRequestBuilder.() -> Unit = {}): PostgrestResult

Executes a delete operation on the table.

Link copied to clipboard
inline suspend fun <T : Any> insert(value: T, request: InsertRequestBuilder.() -> Unit = {}): PostgrestResult
inline suspend fun <T : Any> insert(values: List<T>, request: InsertRequestBuilder.() -> Unit = {}): PostgrestResult

Executes an insert operation on the table

Link copied to clipboard
inline suspend fun select(columns: Columns = Columns.ALL, request: SelectRequestBuilder.() -> Unit = {}): PostgrestResult

Executes vertical filtering with select on table

Link copied to clipboard
inline suspend fun <T : Any> update(value: T, request: PostgrestRequestBuilder.() -> Unit = {}): PostgrestResult
inline suspend fun update(crossinline update: PostgrestUpdate.() -> Unit = {}, request: PostgrestRequestBuilder.() -> Unit = {}): PostgrestResult

Executes an update operation on the table.

Link copied to clipboard
inline suspend fun <T : Any> upsert(value: T, request: UpsertRequestBuilder.() -> Unit = {}): PostgrestResult
inline suspend fun <T : Any> upsert(values: List<T>, request: UpsertRequestBuilder.() -> Unit = {}): PostgrestResult

Perform an UPSERT on the table or view. Depending on the column(s) passed to UpsertRequestBuilder.onConflict, upsert allows you to perform the equivalent of `insert if a row with the corresponding onConflict columns doesn't exist, or if it does exist, perform an alternative action depending on UpsertRequestBuilder.ignoreDuplicates.