Is it possible to avoid announcing the StaticDatabaseConfig annotation in each class using tsql in Slick 3.x?

If I want to use compiled time queries in Slick 3.x, I need to declare a StaticDatabaseConfig annotation in each class using tsql.

Is there a way to avoid this and establish a global configuration?

@StaticDatabaseConfig("file:src/main/resources/application.conf#tsql") object PersistenceService { val database = Database.forConfig("database") database.run( tsql"SELECT NOW()" ) } 
+7
scala tsql
source share

No one has answered this question yet.

See related questions:

416
Selecting columns from a stored procedure result set
299
Is there a combination of "LIKE" and "IN" in SQL?
eleven
Scala Cut Cake: Over 9,000 Grades?
3
Return db connection to HikariCP pool using Slick 3.1.x
2
Slick 3.0.0 Fulfills Requests
2
Slick 3.0 has a way to declare tables without using a special JDBC driver
2
Avoid explicit MySQL declarations in Slick 3.x
one
Collect all the annotated class name in some scala object
one
slip filter from any other class
0
Declaring Tables in Slick

All Articles