You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quill creates queries during compile time it is very useful for the user to know what run expressions create what queries. In Scala 2 I would print this information using Context.info
defquery(queryString: String, idiom: Idiom):Unit= {
if (debugEnabled) c.info(c.enclosingPosition, queryString, force =true)
}
This gives the output:
[info] queries.scala: 284: SELECT x.name, x.age FROM Person x
[info] val result = run(query[Person])
[info] ^
It would be really nice to be able to do this with report.info:
report.info(queryString)
And get an output that looks like this:
[info] -- Info: /Users/me/git/protoquill/quill-sql/src/test/scala/io/getquill/ActionTest.scala:81:26
[info] 81 | val result = ctx.run(query[Person].insert(Person(lift("Joe"), 123)))
[info] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[info] | Compile Time Query Is: INSERT INTO Person (name,age) VALUES (?, 123)
[info] | This location contains code that was inlined from ActionTest.scala:81
[info] | This location contains code that was inlined from Context.scala:139
Right now there's only report.warning which I couldn't use since lots of users do -Xfatal-warnings.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
3.0.0-RC1
Minimized example
Quill creates queries during compile time it is very useful for the user to know what
run
expressions create what queries. In Scala 2 I would print this information using Context.infoThis gives the output:
It would be really nice to be able to do this with
report.info
:And get an output that looks like this:
Right now there's only report.warning which I couldn't use since lots of users do
-Xfatal-warnings
.The text was updated successfully, but these errors were encountered: