Hi! I'm starting with kotlin+exposed, how does the...
# exposed
z
Hi! I'm starting with kotlin+exposed, how does the Database object got passed to transaction {} method?
Copy code
Database.connect("<url>", driver = "org.postgresql.Driver", user = "..", password = "...")
transaction {
and which is the common approach to initialise Database, so I don't create it in each service method? Thanks in advance
t
By default last connected database stored in transaction manager with global scope, so you can connect-once use-everywhere.