instep.dao.sql.SQLPlanExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of instep-dao Show documentation
Show all versions of instep-dao Show documentation
Tools are designed for more easier coding.
The newest version!
@file:Suppress("unused")
package instep.dao.sql
import instep.Instep
import java.sql.Connection
import java.sql.ResultSet
import java.time.temporal.Temporal
@Suppress("UNCHECKED_CAST")
val planExecutor: SQLPlanExecutor>
get() = Instep.make(SQLPlanExecutor::class.java) as SQLPlanExecutor>
/**
* @see [SQLPlanExecutor.execute]
*/
@Throws(SQLPlanExecutionException::class)
fun SQLPlan<*>.execute() {
planExecutor.execute(this)
}
/**
* @see [SQLPlanExecutor.execute]
*/
@Throws(SQLPlanExecutionException::class)
fun SQLPlan<*>.execute(cls: Class): List {
return planExecutor.execute(this, cls)
}
/**
* @see [SQLPlanExecutor.executeString]
*/
@Throws(SQLPlanExecutionException::class)
fun SQLPlan<*>.executeString(): String {
return planExecutor.executeString(this)
}
/**
* @see [SQLPlanExecutor.executeLong]
*/
@Throws(SQLPlanExecutionException::class)
fun SQLPlan<*>.executeLong(): Long {
return planExecutor.executeLong(this)
}
/**
* @see [SQLPlanExecutor.executeDouble]
*/
@Throws(SQLPlanExecutionException::class)
fun SQLPlan<*>.executeDouble(): Double {
return planExecutor.executeDouble(this)
}
/**
* @see [SQLPlanExecutor.executeTemporal]
*/
@Throws(SQLPlanExecutionException::class)
fun SQLPlan<*>.executeTemporal(cls: Class): R? {
return planExecutor.executeTemporal(this, cls)
}
/**
* @see [SQLPlanExecutor.executeUpdate]
*/
@Throws(SQLPlanExecutionException::class)
fun SQLPlan<*>.executeUpdate(): Int {
return planExecutor.executeUpdate(this)
}
/**
* @see [SQLPlanExecutor.executeResultSet]
*/
@Throws(SQLPlanExecutionException::class)
fun SQLPlan<*>.executeResultSet(conn: Connection): ResultSet {
return planExecutor.executeResultSet(conn, this)
}
/**
* @see [SQLPlanExecutor.execute]
*/
@Throws(SQLPlanExecutionException::class)
fun TableSelectPlan.execute(): List {
return planExecutor.execute(this, TableRow::class.java)
}
/**
* @see [SQLPlanExecutor.execute]
*/
@Throws(SQLPlanExecutionException::class)
fun TableSelectPlan.execute(cls: Class): List {
return planExecutor.execute(this, cls)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy