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

io.tcds.orm.param.InstantParam.kt Maven / Gradle / Ivy

Go to download

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))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy