Exposed
Exposed copied to clipboard
Use concat when strings are added
I get this error when I try to update with a plus concatenation:
org.jetbrains.exposed.exceptions.ExposedSQLException: org.h2.jdbc.JdbcSQLFeatureNotSupportedException: Caracteristica no soportada: "VARCHAR +" Feature not supported: "VARCHAR +"; S
The code to test is this:
Country.update {
with(SqlExpressionBuilder) {
it[name] = name + "ABC"
}
}
I think that Strings should concat by default.
Hi @Tapac, I've added other two functions and created the test.
Looks like your test fails on PostgreSQL (https://teamcity.jetbrains.com/viewType.html?buildTypeId=Exposed_PullRequests&branch_Exposed=830%2Fmerge)
I don't understand why, and I don't know yet how to run tests with all drivers, can you help me?.
Base tests (H2,SQLite,MySQL,PostgreSQL) run with simple gradle :exposed-tests test
If you desire to test SQLServer, Oracle, MariaDB or MySQL 8.0 you have to adjust dialect
value in gradle.properties
and execute gradle :exposed-tests exposedDialectTestWithDocker
@AliLozano you could check https://github.com/JetBrains/Exposed/wiki/Contributing#how-to-contibute on how to run tests
@Tapac thanks for the information, I will check it this week, and update my pull request. 😁
Hey @AliLozano, I failed to push the PR into your branch, so I recreated the PR here: https://github.com/JetBrains/Exposed/pull/1958. I will rebease it and fix the test
Thanks for the contribution!