Das135
SELECT 'custom1' as custom, id, name, address FROM persons
Bogdan
object Persons : IntIdTable() { val name = varchar("name", 255) val address = varchar("address", 500) } fun main() { Database.connect("jdbc:h2:mem:regular;DB_CLOSE_DELAY=-1;", "org.h2.Driver") transaction { SchemaUtils.create(Persons) Persons.insert { it[name] = "Name" it[address] = "Addresss" } Persons.selectAll().forEach(::println) val custom = stringParam("custom1").alias("custom") Persons.slice(Persons.columns + custom) // or .slice(listOf(custom) + Persons.columns) first custom .selectAll() .forEach { println(it[custom]) } } }
stringParam
A modern programming language that makes developers happier.