All Downloads are FREE. Search and download functionalities are using the official Maven repository.

run.smt.ktest.db.query.select-queries.kt Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package run.smt.ktest.db.query

import run.smt.ktest.db.query.impl.SelectBuilder
import org.springframework.jdbc.core.JdbcTemplate
import javax.sql.DataSource

inline fun  DataSource.select(query: String): Response {
    return select(query) {}
}

inline fun  DataSource.select(query: String? = null, build: SelectBuilder.() -> Unit): Response {
    val builder = SelectBuilder(query)
    builder.mapTo(T::class)
    builder.build()
    return builder.execute(JdbcTemplate(this))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy