We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context :
When using a multi-schema database, we have to qualify tables that are not on the current_schema.
e.g
class XFoo< ROM::Relation[:sql] schema(Sequel::SQL::QualifiedIdentifier.new('x', 'foo'), as: :x_foo, infer: true) do attribute :id, Types::Integer attribute :value, Types::Float attribute :bar_id, Types::ForeignKey(:bar) primary_key :id associations do belongs_to :bars, as: :bar, foreign_key: :bar_id end end end
The line ROM.env.relations[:x_foo].to_a don't find the table "'x'.'foo'".
ROM.env.relations[:x_foo].to_a
"'x'.'foo'"
How could I replace the Sequel::SQL::QualifiedIdentifier.new? If this needs more dev, how can I help? :)
Sequel::SQL::QualifiedIdentifier.new
Create a database with 2 schemas, one table each. Create a relation for both tables.
I should be able to query 'x'.'foo' and not "'x'.'foo'"
'x'.'foo'
The text was updated successfully, but these errors were encountered:
It's a duplicate of #163
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Context :
When using a multi-schema database, we have to qualify tables that are not on the current_schema.
e.g
The line
ROM.env.relations[:x_foo].to_a
don't find the table"'x'.'foo'"
.How could I replace the
Sequel::SQL::QualifiedIdentifier.new
?If this needs more dev, how can I help? :)
To Reproduce
Create a database with 2 schemas, one table each.
Create a relation for both tables.
Expected behavior
I should be able to query
'x'.'foo'
and not"'x'.'foo'"
My environment
The text was updated successfully, but these errors were encountered: