Abstract KSql Client Delegate
Functions
Link copied to clipboard
Link copied to clipboard
open override fun <E : Any> createDelete(entityType: KClass<E>, block: KMutableDelete<E>.() -> Unit): KExecutable<Int>
Link copied to clipboard
open fun <E : Any, R> createQuery(entityType: KClass<E>, block: KMutableRootQuery<E>.() -> KConfigurableRootQuery<E, R>): KConfigurableRootQuery<E, R>
Link copied to clipboard
open override fun <E : Any> createUpdate(entityType: KClass<E>, block: KMutableUpdate<E>.() -> Unit): KExecutable<Int>
Link copied to clipboard
open fun <E : Any> deleteById(type: KClass<E>, id: Any, block: KDeleteCommandDsl.() -> Unit): KDeleteResult
open fun <E : Any> deleteById(type: KClass<E>, id: Any, mode: DeleteMode = DeleteMode.AUTO): KDeleteResult
Link copied to clipboard
open fun <E : Any> deleteByIds(type: KClass<E>, ids: Iterable<*>, block: KDeleteCommandDsl.() -> Unit): KDeleteResult
open fun <E : Any> deleteByIds(type: KClass<E>, ids: Iterable<*>, mode: DeleteMode = DeleteMode.AUTO): KDeleteResult
Link copied to clipboard
Link copied to clipboard
open fun <E : Any> executeDelete(entityType: KClass<E>, con: Connection? = null, block: KMutableDelete<E>.() -> Unit): Int
Link copied to clipboard
open fun <E : Any, R> executeQuery(entityType: KClass<E>, limit: Int? = null, con: Connection? = null, block: KMutableRootQuery<E>.() -> KConfigurableRootQuery<E, R>): List<R>
Link copied to clipboard
open fun <E : Any> executeUpdate(entityType: KClass<E>, con: Connection? = null, block: KMutableUpdate<E>.() -> Unit): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun <E : Any, V : View<E>> findOneOrNull(viewType: KClass<V>, con: Connection? = null, block: KMutableRootQuery<E>.() -> Unit): V?
open fun <E : Any> findOneOrNull(fetcher: Fetcher<E>, con: Connection? = null, block: KMutableRootQuery<E>.() -> Unit): E?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun <E : Any> insert(entity: E, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
Insert an entity object
open fun <E : Any> insert(input: Input<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
Insert an input DTO
Link copied to clipboard
open fun <E : Any> insertEntities(entities: Iterable<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> insertEntitiesIfAbsent(entities: Iterable<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND_IF_ABSENT, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> insertIfAbsent(entity: E, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND_IF_ABSENT, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
Insert an entity object if necessary, if the entity object exists in database, ignore it.
open fun <E : Any> insertIfAbsent(input: Input<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND_IF_ABSENT, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
Insert an input DTO if necessary, that means to convert the input DTO to entity object and save it. If the entity object exists in database, ignore it.
Link copied to clipboard
open fun <E : Any> insertInputs(inputs: Iterable<Input<E>>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> insertInputsIfAbsent(inputs: Iterable<Input<E>>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND_IF_ABSENT, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
fun <S : Any, T : Any> KSqlClient.listExists(prop: KProperty1<S, List<T>>, block: KMutableRootQuery<Association<S, T>>.() -> Unit): Boolean
Link copied to clipboard
open fun <E : Any> merge(entity: E, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
Merge an entity object
open fun <E : Any> merge(input: Input<E>, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
Merge an input DTO
Link copied to clipboard
open fun <E : Any> mergeEntities(entities: Iterable<E>, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> mergeInputs(inputs: Iterable<Input<E>>, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
fun <S : Any, T : Any> KSqlClient.refExists(prop: KProperty1<S, T>, block: KMutableRootQuery<Association<S, T>>.() -> Unit): Boolean
Link copied to clipboard
open override fun <E : Any, V : View<E>> save(entity: E, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): KSimpleSaveResult.View<E, V>
open override fun <E : Any> save(entity: E, fetcher: Fetcher<E>, block: KSaveCommandDsl.() -> Unit?): KSimpleSaveResult<E>
open override fun <E : Any, V : View<E>> save(input: Input<E>, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): KSimpleSaveResult.View<E, V>
open override fun <E : Any> save(input: Input<E>, fetcher: Fetcher<E>, block: KSaveCommandDsl.() -> Unit?): KSimpleSaveResult<E>
open override fun <E : Any, V : View<E>> save(entity: E, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): KSimpleSaveResult.View<E, V>
open override fun <E : Any> save(entity: E, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<E>, block: KSaveCommandPartialDsl.() -> Unit?): KSimpleSaveResult<E>
open override fun <E : Any, V : View<E>> save(input: Input<E>, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): KSimpleSaveResult.View<E, V>
open override fun <E : Any> save(input: Input<E>, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<E>, block: KSaveCommandPartialDsl.() -> Unit?): KSimpleSaveResult<E>
open fun <E : Any> save(input: Input<E>, block: KSaveCommandDsl.() -> Unit? = null): KSimpleSaveResult<E>
open fun <E : Any> save(entity: E, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.MERGE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
open fun <E : Any> save(input: Input<E>, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.MERGE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
Link copied to clipboard
open override fun <E : Any> saveCommand(entity: E, block: KSaveCommandDsl.() -> Unit?): KSimpleEntitySaveCommand<E>
open fun <E : Any> saveCommand(input: Input<E>, block: KSaveCommandDsl.() -> Unit? = null): KSimpleEntitySaveCommand<E>
open fun <E : Any> saveCommand(entity: E, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleEntitySaveCommand<E>
open fun <E : Any> saveCommand(input: Input<E>, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleEntitySaveCommand<E>
Link copied to clipboard
open override fun <E : Any, V : View<E>> saveEntities(entities: Iterable<E>, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): KBatchSaveResult.View<E, V>
open override fun <E : Any> saveEntities(entities: Iterable<E>, fetcher: Fetcher<E>, block: KSaveCommandDsl.() -> Unit?): KBatchSaveResult<E>
open override fun <E : Any, V : View<E>> saveEntities(entities: Iterable<E>, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): KBatchSaveResult.View<E, V>
open override fun <E : Any> saveEntities(entities: Iterable<E>, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<E>, block: KSaveCommandPartialDsl.() -> Unit?): KBatchSaveResult<E>
open fun <E : Any> saveEntities(entities: Iterable<E>, block: KSaveCommandDsl.() -> Unit? = null): KBatchSaveResult<E>
open fun <E : Any> saveEntities(entities: Iterable<E>, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.MERGE, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open override fun <E : Any> saveEntitiesCommand(entities: Iterable<E>, block: KSaveCommandDsl.() -> Unit?): KBatchEntitySaveCommand<E>
open fun <E : Any> saveEntitiesCommand(entities: Iterable<E>, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchEntitySaveCommand<E>
Link copied to clipboard
open override fun <E : Any, V : View<E>> saveInputs(inputs: Iterable<Input<E>>, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): KBatchSaveResult.View<E, V>
open override fun <E : Any> saveInputs(inputs: Iterable<Input<E>>, fetcher: Fetcher<E>, block: KSaveCommandDsl.() -> Unit?): KBatchSaveResult<E>
open override fun <E : Any, V : View<E>> saveInputs(inputs: Iterable<Input<E>>, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): KBatchSaveResult.View<E, V>
open override fun <E : Any> saveInputs(inputs: Iterable<Input<E>>, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<E>, block: KSaveCommandPartialDsl.() -> Unit?): KBatchSaveResult<E>
open fun <E : Any> saveInputs(inputs: Iterable<Input<E>>, block: KSaveCommandDsl.() -> Unit? = null): KBatchSaveResult<E>
open fun <E : Any> saveInputs(inputs: Iterable<Input<E>>, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.MERGE, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> saveInputsCommand(input: Iterable<Input<E>>, block: KSaveCommandDsl.() -> Unit? = null): KBatchEntitySaveCommand<E>
open fun <E : Any> saveInputsCommand(inputs: Iterable<Input<E>>, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchEntitySaveCommand<E>
Link copied to clipboard
Execute a transaction by the specified Propagation behavior
Link copied to clipboard
open fun <E : Any> update(entity: E, associatedMode: AssociatedSaveMode = AssociatedSaveMode.UPDATE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
Update an entity object
open fun <E : Any> update(input: Input<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.UPDATE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
Update an input DTO
Link copied to clipboard
open fun <E : Any> updateEntities(entities: Iterable<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.UPDATE, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> updateInputs(inputs: Iterable<Input<E>>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.UPDATE, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
Validate the database manually.