activemodel / kales.internal / RecordQueryBuilder

RecordQueryBuilder

class RecordQueryBuilder

Constructors

<init>

RecordQueryBuilder(handle: Handle, applicationRecordClass: KApplicationRecordClass, recordUpdater: RecordUpdater = RecordUpdater(handle, applicationRecordClass))

Functions

allRecords

fun allRecords(): Query

create

fun create(values: Map<String, Any?>): Update

destroy

fun destroy(record: ApplicationRecord): Unit

Destroys (deletes) a record from the database. If the record's ID is missing (none/unsaved), this will throw IllegalStateException instead.

findRecord

fun findRecord(id: Int): Query

update

fun update(record: ApplicationRecord): Unit

where

fun where(clause: Map<String, Any?>): Query