Files
postgres-json/src/main/kotlin/fr/postgresjson/connexion/EmbedExecutableReified.kt
Fabrice Lecomte a7e66ab8b5 Clean the request process
Remove paginated
Remove Entity classes
Add Annotation for serialize object
rename selectOne/selectMultiple to execute
2023-04-06 21:03:15 +02:00

26 lines
825 B
Kotlin

package fr.postgresjson.connexion
import com.fasterxml.jackson.core.type.TypeReference
import kotlin.jvm.Throws
@Throws(DataNotFoundException::class)
inline fun <reified R : Any> EmbedExecutable.execute(
values: List<Any?>,
noinline block: SelectCallback<R> = {}
): R? =
execute(object : TypeReference<R>() {}, values, block)
@Throws(DataNotFoundException::class)
inline fun <reified R : Any> EmbedExecutable.execute(
values: Map<String, Any?>,
noinline block: SelectCallback<R> = {}
): R? =
execute(object : TypeReference<R>() {}, values, block)
@Throws(DataNotFoundException::class)
inline fun <reified R : Any> EmbedExecutable.execute(
vararg values: Pair<String, Any?>,
noinline block: SelectCallback<R> = {}
): R? =
execute(object : TypeReference<R>() {}, values = values, block)