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
Consider the following example:
{ someFieldA: Raw((columnAlias) => `${columnAlias} = :param`, { param: 5 }), someFieldB: Raw((columnAlias) => `${columnAlias} = :param`, { param: 0 }), }
In this case it's a design restriction that param has to be named uniquely every time manually.
param
It would be nice to have a signature that allows to do the following:
{ someFieldA: Raw((columnAlias) => `${columnAlias} = :${columnAlias}`, (columnAlias) => ({ [`${columnAlias}`]: 5 })), someFieldB: Raw((columnAlias) => `${columnAlias} = :${columnAlias}`, (columnAlias) => ({ [`${columnAlias}`]: 0 })), }
This would allow an elegant way to avoid naming collision in decoupled code.
Alternative, we can consider the following approach:
{ someFieldA: Raw((columnAlias) => `${columnAlias} = :{0}`, [ 5 ]), someFieldB: Raw((columnAlias) => `${columnAlias} = :{0}`, [ 0 ]), }
where {0} and so on would be automatically replaced with auto-generated param names.
{0}
No response
Yes, I have the time, but I don't know how to start. I would need guidance.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature Description
Consider the following example:
In this case it's a design restriction that
param
has to be named uniquely every time manually.The Solution
It would be nice to have a signature that allows to do the following:
This would allow an elegant way to avoid naming collision in decoupled code.
Considered Alternatives
Alternative, we can consider the following approach:
where
{0}
and so on would be automatically replaced with auto-generated param names.Additional Context
No response
Relevant Database Driver(s)
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, but I don't know how to start. I would need guidance.
The text was updated successfully, but these errors were encountered: