Valentin Rouault
10/26/2018, 4:58 PMprintln("DSL: ${Kreuzungen.selectAll().toList().get(0)}")
println("Element 1: ${Kreuzung.all().toList().get(0)}")
christophsturm
10/26/2018, 9:55 PMtapac
10/30/2018, 12:10 PMspand
11/06/2018, 10:35 AMInsertStatement.generatedKey
. Is there any particular usecase that isnt better handled by get()
?
With get()
you get the correct type, while with generatedKey
you need to toInt()
it or similar. Asking as I would prefer to see it removed since I see some bad usages of it in our codebase.jeggy
11/06/2018, 3:27 PMMiclebrick
11/08/2018, 3:06 AMSHOW PROCESSLIST
& SHOW ENGINE INNODB STATUS
output via CLI this time: https://gist.github.com/Miclebrick/8622e4542a7f246bb1f3a8dcda951ba7 Can anyone help me out?Allan Wang
11/08/2018, 6:04 PMjeggy
11/09/2018, 6:09 PM<T: Any> Map<Column<out T?>, T>
. My only problem is, how can I convert the out T?
into T?
?Allan Wang
11/10/2018, 6:15 AMAllan Wang
11/10/2018, 7:27 AMerica
11/12/2018, 5:14 PMvarchar(MAX)
for table definition? I need to insert more than 8000 chars. I’m using DSL and SQL.Sergio Casero
11/14/2018, 4:16 PMMiclebrick
11/20/2018, 4:06 PMSergio Casero
11/21/2018, 5:21 PMWARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Alice
11/26/2018, 4:05 PMclass User(id: EntityID<Long>) : LongEntity(id) {
var images by Image via UserImages
companion object : LongEntityClass<User>(Users)
}
My image simplified is like
class Image(id: EntityID<Long>) : LongEntity(id) {
val user by User referencedOn Images.user
companion object : LongEntityClass<Image>(Images)
}
And my tables are as follows
object Images : LongIdTable() {
val user = reference("user", Users)
}
object Users : LongIdTable() {
// Do I need to do something to establish a relationship to images here?
}
object UserImages : Table() {
val user = reference("user", Users).primaryKey(0)
val image = reference("image", Images).primaryKey(1)
}
I've been following the tutorial on the wiki, and I was fine with everything I think until I started trying to establish this relationship. I hope this isn't too much of a noob question, I just decided to try Kotlin yesterday after people scala-shaming me for months 😜.Marcin Wisniowski
11/30/2018, 3:08 PM!User.find { Users.login eq login }.empty()
, still not sure if this is the proper wayoshai
12/02/2018, 2:16 PMPreparedStatement
?Jorge R
12/07/2018, 3:38 PMyen
12/10/2018, 8:57 AMSELECT *
FROM my_table
WHERE (col1, col2) IN ((1, 'apple'), (2, 'banana'), (3, 'cat'));
reik.schatz
12/12/2018, 3:29 PMFoo.insert {
it[name] = foo.name
it[query] = foo.query
it[description] = foo.description
it[status] = foo.status
}
Foo.update (where = { Foo.id.eq(fooId) } ) {
it[name] = foo.name
it[query] = foo.query
it[description] = foo.description
it[status] = foo.status
}
tKw
12/13/2018, 6:04 PMDave
12/17/2018, 9:25 AMrrader
12/19/2018, 10:15 AMobject Users : Table() {
val id = varchar("id", 10).primaryKey() // Column<String>
val name = varchar("name", length = 50) // Column<String>
val cityId = (integer("city_id") references Cities.id).nullable() // Column<Int?>
}
Users.insert {
it[id] = "andrey"
it[name] = "Andrey"
it[cityId] = saintPetersburgId
}
how compiler know that it[id]
is valid and for example it[title]
is not valid?rrader
12/24/2018, 7:49 AMrrader
12/30/2018, 7:51 PMbjonnh
01/02/2019, 6:43 PMbjonnh
01/03/2019, 7:58 PMkotlin
fun getCitation(code: String, offset: Int = 0): Citation? {
var result: Citation? = null
transaction(db) {
result = Citation.wrapRows(Citations
.select { Citations.code eq code }.limit(1)).toList().getOrNull(0)
}
return result
}
Torbilicious
01/08/2019, 1:38 PMSomeTable.batchInsert((0 until 1_000).toList()) { number ->
this[SomeTable.type] = "some-type"
this[SomeTable.data] = """{"foo":"$number"}"""
}
but for some reason exposed creates 1000 statements for this instead of one batch statement. Is this the intended behaviour, or am i missing something?SackCastellon
01/09/2019, 10:12 AMjonathan
01/10/2019, 5:42 PMUPDATE Orders SET Quantity = Quantity + 1 WHERE ...
(I'm currently just doing it with a raw SQL query)