KSqlClientImplementor

interface KSqlClientImplementor : KSqlClient

Functions

Link copied to clipboard
@NewChain
abstract fun caches(block: KCacheDisableDsl.() -> Unit): KSqlClient
Link copied to clipboard
abstract 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
abstract 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
@NewChain
abstract fun disableSlaveConnectionManager(): KSqlClient
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
@NewChain
abstract fun executor(executor: Executor?): KSqlClient
Link copied to clipboard
@NewChain
abstract fun filters(block: KFilterDsl.() -> Unit): KSqlClient
Link copied to clipboard
open fun <E : Any, V : View<E>> findAll(viewType: KClass<V>, limit: Int? = null, con: Connection? = null, block: KMutableRootQuery<E>.() -> Unit = {}): List<V>
open fun <E : Any> findAll(fetcher: Fetcher<E>, limit: Int? = null, con: Connection? = null, block: KMutableRootQuery<E>.() -> Unit = {}): List<E>
Link copied to clipboard
open fun <T : Any> findById(type: KClass<T>, id: Any): T?
open fun <E : Any> findById(fetcher: Fetcher<E>, id: Any): E?
Link copied to clipboard
open fun <T : Any> findByIds(type: KClass<T>, ids: Iterable<*>): List<T>
open fun <E : Any> findByIds(fetcher: Fetcher<E>, ids: Iterable<*>): List<E>
Link copied to clipboard
open fun <K, T : Any> findMapByIds(type: KClass<T>, ids: Iterable<K>): Map<K, T>
open fun <K, V : Any> findMapByIds(fetcher: Fetcher<V>, ids: Iterable<K>): Map<K, V>
Link copied to clipboard
open fun <E : Any, V : View<E>> findOne(viewType: KClass<V>, con: Connection? = null, block: KMutableRootQuery<E>.() -> Unit): V
open fun <E : Any> findOne(fetcher: Fetcher<E>, con: Connection? = null, block: KMutableRootQuery<E>.() -> Unit): E
Link copied to clipboard
open fun <T : Any> findOneById(type: KClass<T>, id: Any): T
open fun <E : Any> findOneById(fetcher: Fetcher<E>, id: Any): E
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
abstract fun getAssociations(prop: KProperty1<*, *>): KAssociations
Link copied to clipboard
abstract fun getTriggers(transaction: Boolean): KTriggers
  • If trigger type is 'BINLOG_ONLY'
    • If `transaction` is true, throws exception
    • If `transaction` is false, return binlog trigger
  • If trigger type is 'TRANSACTION_ONLY', returns transaction trigger no matter what the `transaction` is
  • If trigger type is 'BOTH'
    • If `transaction` is true, return transaction trigger
    • If `transaction` is false, return binlog trigger
    Note that the objects returned by different parameters are independent of each other.
Link copied to clipboard
abstract fun initialize()
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> 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> merge(entity: E, associatedMode: AssociatedSaveMode = AssociatedSaveMode.MERGE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Merge an entity object

open fun <E : Any> merge(input: Input<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.MERGE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Merge an input DTO

Link copied to clipboard
open fun <E : Any> save(entity: E, block: KSaveCommandDsl.() -> Unit? = null): KSimpleSaveResult<E>
open fun <E : Any> save(entity: E, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
open fun <E : Any> save(entity: E, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Save an entity object

open fun <E : Any> save(input: Input<E>, block: KSaveCommandDsl.() -> Unit? = null): KSimpleSaveResult<E>
open fun <E : Any> save(input: Input<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
open fun <E : Any> save(input: Input<E>, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Save an input DTO

Link copied to clipboard
open fun <E : Any> saveEntities(entities: Iterable<E>, block: KSaveCommandDsl.() -> Unit? = null): KBatchSaveResult<E>

Save some entity objects

Link copied to clipboard
open fun <E : Any> saveInputs(inputs: Iterable<Input<E>>, block: KSaveCommandDsl.() -> Unit? = null): KBatchSaveResult<E>

Save some input DTOs

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

Properties

Link copied to clipboard
abstract val binLog: BinLog
Link copied to clipboard
abstract val caches: KCaches
Link copied to clipboard
abstract val entities: KEntities
Link copied to clipboard
abstract val entityManager: EntityManager
Link copied to clipboard
abstract val filters: KFilters
Link copied to clipboard
abstract val javaClient: JSqlClientImplementor
Link copied to clipboard
abstract val loaders: KLoaders
Link copied to clipboard
abstract val queries: KQueries
Link copied to clipboard
abstract val triggers: KTriggers

This property is equivalent to getTriggers(false)

Inheritors

Link copied to clipboard