Hello everyone! We’ve just released Komapper v3.1...
# komapper
t
Hello everyone! We’ve just released Komapper v3.1.0! This version brings two main improvements for SQL templates: 1. Added special variables in the
for
directive to simplify code. 2. Improved error messages to better indicate where issues occur in SQL. https://github.com/komapper/komapper/releases/tag/v3.1.0
👍🏼 1
👍 1
d
@Toshihiro Nakamura Just wondering if the improved error messages also get passed to DryRunResult? Or are they on the level of Database?
t
The improved error messages also get passed to DryRunResult.
👍🏼 1
d
And they stay on one line (like I said Grafana Loki needs special configs to handle multi-line logs...)? At worst, I could always just remove all the
\n
s for production, so it's not such a big deal, just making sure.
t
No. The error message includes a newline at both the beginning and the end of the SQL statement.
Copy code
The expression evaluation failed. The template variable "street2" is not bound to a value. Make sure the variable name is correct at [street2 != null]:1:1 at [
select * from address where >>>/*%if street2 != null*/<<< street = /*street*/'test' /*%end*/
]:1:29.
It’s okay to remove them, though...
👍🏼 1