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 Inserter {
/**
* Insert these rows into this table
* * Executes automatically
*/
fun insert(table : Table, vararg rows : E) {
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 : E) {
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 [Inserter.insert]
*/
fun insert(vararg rows : E) {
insert(rows.toList())
}
/**
* Insert.insert(table : Table<E>, rows : Collection<E>)
*
* @sample [Cannot_link_to_specific_method][insert]
*/
fun insert(rows : Collection)
/**
* Insert.insert(table : Table<E>, duplicate : Duplicate<Table<E>>, vararg rows : E)
*
* @sample [Cannot_link_to_specific_method][insert]
*/
fun insert(duplicate : Duplicate>, vararg rows : E) {
insert(duplicate, rows.toList())
}
/**
* Insert.insert(table : Table<E>, duplicate : Duplicate<Table<E>>, rows : Collection<E>)
*
* @sample [Cannot_link_to_specific_method][insert]
*/
fun insert(duplicate : Duplicate>, rows : Collection)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy