https://kotlinlang.org logo
#exposed
Title
# exposed
a

APXEOLOG

10/21/2018, 1:28 PM
I'm new to kotlin, not sure how to do it properly
h

Hamza

10/21/2018, 1:29 PM
check out the readme.md on the github page: https://github.com/Jetbrains/Exposed/
a

APXEOLOG

10/21/2018, 1:42 PM
There are no such examples. What i need is something like this:
Table.select { generateSelectFunc(a, b, c) }
a

APXEOLOG

10/21/2018, 2:06 PM
I still don't see it. I need to wrap
Table.select { id eq 1 }
into a function like this
Table.select { getId() }
h

Hamza

10/21/2018, 2:06 PM
what are you trying to achieve?
a

APXEOLOG

10/21/2018, 2:07 PM
I have complex primary key with multiple columns and i want to wrap it into a func to not copy paste it every time
h

Hamza

10/21/2018, 2:08 PM
you can make a function on SqlExpressionBuilder
Copy code
fun SqlExpressionBuilder.validateIdIs(num: Int) = id eq num
a

APXEOLOG

10/21/2018, 2:13 PM
Oh, what will help, thanks!
👍 1
2 Views