Hello ! I have a question. Using kotlin + spring ...
# exposed
h
Hello ! I have a question. Using kotlin + spring + exposed, Do I really need to call
newSuspendTransaction
when calling the database ?
l
yes, if you are using
suspend
functions. For regular functions, you would use
transaction
. Exposed requires it for both reads and writes.
t
what is the usecase of the spring-boot-starter? just to connect the database?
f
The spring module contains the stuff that makes transactions work with springs
@Transactional
+ some custom error handling I think. The starter itself simply sets up the spring transaction manager + auto-connects the spring JDBC
DataSource
as the primary database in Exposed