Closed beikern closed 5 years ago
@getquill/maintainers SQL does not support passing table names or column names as parameters. Therefore, my question is, Is this feature a priority? Can anyone think of another way to do this?
@gustavoamigo I think it wouldn't be hard to support it. Maybe extending BetaReduction
to reduce the schema definition as well would be enough?
@fwbrasil We would need to change the Entity AST to use Ident instead of pure String for table alias and change the BetaReduction
. But there is a big but, we would open Quill to SQL Injection vulnerabilities.
@gustavoamigo good point. I'd remove the 1.0
tag then and think about it after the 1.0
release.
We should also have a better error message, related to #42
Hi guys! We really need feature to change table name dynamically in runtime, because we deal with great amount of tables with similar structure but different name in cassandra. Can you please advice how to tweak quill quickly for this?
I'm also interested in when this could be expected. We're at the decision point at the project regarding DB, and this is currently the only but major downside for us as we use multiple schemas at Postgres. So knowing approximate timeframe would be great
Another way is using infix with literal
interpolation as mentioned #223 , and allow infix
as table
.
For example, we may add liftSql
and process that ast within ReifyStatement
val suffix = "123"
val foo = quote(infix"foo_${liftSql(suffix)}".as[EntityQuery[Foo]])
This way may be much easier
Closed in favor of https://github.com/getquill/quill/issues/223
First, forgive me about the possible ambiguous title, feel free to edit it if needed.
Version: 0.6.0 Module: quill-cassandra
Expected behavior
The insert query should be executed pointing at the table "test_table"
Actual behavior
The insert query is executed pointing at the table "foo", using the naming strategy defined in CassandraAsyncSource (SnakeCase in this example) throwing the following error
Steps to reproduce the behavior
@getquill/maintainers