io.tcds.orm.param.InstantParam.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of orm Show documentation
Show all versions of orm Show documentation
Kotlin Simple ORM is a simple but powerful database orm for kotlin applications
The newest version!
package io.tcds.orm.param
import io.tcds.orm.Param
import java.sql.PreparedStatement
import java.sql.Timestamp
import java.time.Instant
data class InstantParam(
override val name: String,
override val value: Instant,
) : Param {
override fun plain(): String = value.toString()
override fun bind(stmt: PreparedStatement, index: Int) = stmt.setTimestamp(index, Timestamp.from(value))
}