Skip to content

Instantly share code, notes, and snippets.

// just a simple data class to use with this demo...
data class Buildingsite(var name: String?,
var siteId: String?,
var description: String?,
var status: String?)
class KotlinSql2oInsert {
companion object : KLogging() // using this for logging..
@kskyle
kskyle / Sql2oSelectTest.kt
Last active August 28, 2018 10:33
Kotlin + SQL2O select example.
class Sql2oSelectTest {
companion object : KLogging() // I'm using this for loging
// just a simple Data class for testing purposes..
data class EmployeesAndIntroductions(var id: Int?, var firstname: String?, var lastname: String?, var role: String?, var introductionname: String?)
fun getEmployeesAndIntroductions(req: Request, res: Response): String {
try {
val sql = "select employee.id, " +