com.sxtanna.db.struct.statement.insert.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Kuery Show documentation
Show all versions of Kuery Show documentation
MySQL Kotlin DSL/ORM based on HikariCP
package com.sxtanna.db.struct.statement
import com.sxtanna.db.struct.Table
import com.sxtanna.db.struct.base.Duplicate
/**
* An object that can insert rows into a table
*/
interface DBInserter {
/**
* Insert these rows into this table
* * Executes automatically
*/
fun insert(table : Table, vararg rows : T) {
insert(table, rows.toList())
}
/**
* Insert these rows into this table
* * Executes automatically
*/
fun insert(table : Table, rows : Collection)
/**
* Insert these rows into this table, using this duplicate key flag
* * Executes automatically
*/
fun insert(table : Table, duplicate : Duplicate>, vararg rows : T) {
insert(table, duplicate, rows.toList())
}
/**
* Insert these rows into this table, using this duplicate key flag
* * Executes automatically
*/
fun insert(table : Table, duplicate : Duplicate>, rows : Collection)
/**
* An object that can insert rows into its table
*/
interface TableInserter {
/**
* @see [DBInserter.insert]
*/
fun insert(vararg rows : T) {
insert(rows.toList())
}
/**
* Insert.insert(table : Table<T>, rows : Collection<T>)
*
* @sample [Cannot_link_to_specific_method][insert]
*/
fun insert(rows : Collection)
/**
* Insert.insert(table : Table<T>, duplicate : Duplicate<Table<T>>, vararg rows : T)
*
* @sample [Cannot_link_to_specific_method][insert]
*/
fun insert(duplicate : Duplicate>, vararg rows : T) {
insert(duplicate, rows.toList())
}
/**
* Insert.insert(table : Table<T>, duplicate : Duplicate<Table<T>>, rows : Collection<T>)
*
* @sample [Cannot_link_to_specific_method][insert]
*/
fun insert(duplicate : Duplicate>, rows : Collection)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy