-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
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
Support non-string prefix #4497
Support non-string prefix #4497
Conversation
We should probably send a PR to |
If we are saying adapters control the prefix then what would be the issue with |
We can probably allow it to be "any literal" but I think it is ok to be a bit more conservative when relaxing those rules. WDYT? |
The only downside I see to expanding the allowed literals is that the error
message has to change in lockstep. Since there are so many ecto_sql users,
I was hesitant to change the error message and possibly increase confusion
for ecto_sql users.
…On Fri, Aug 23, 2024, 4:53 AM José Valim ***@***.***> wrote:
We can probably allow it to be "any literal" but I think it is ok to be a
bit more conservative when relaxing those rules. WDYT?
—
Reply to this email directly, view it on GitHub
<#4497 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABOBHYUZBZYK4UL26GJELTZS32BFAVCNFSM6AAAAABM266HR2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBWGYZDAMZZHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Thanks for the change. I understand wanting to be conservative about the literals for now. |
Thank you @josevalim and @greg-rychlewski ! |
Discussed in #4496
These changes allow an adapter to support a
:prefix
and@schema_prefix
of any type, rather than being restricted to String.t().from
andjoin
query portions still require either string literal or interpolated value. The interpolated value can be anything. Additional literals can be supported here if desired. (from.ex:87 and join.ex:146)Thanks!