-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add support for jdbc parameters in ColDataType precision and scale #2191
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
Add support for jdbc parameters in ColDataType precision and scale #2191
Conversation
5e2061f
to
955ac98
Compare
955ac98
to
1ff341d
Compare
@manticore-projects could you kindly review this PR please? |
I am actually shocked, that Parameters are allowed for this. |
Thanks for the quick reply. Looking forward to hearing your thoughts please. |
Greetings @tomershay. In general I agree with you: whenever a
Although this will make parsing more expensive of course. |
Would that not be a query rewrite instead? I don't think this task belongs to the Grammar. |
No, I believe JDBC parameters / PG parameterized queries do not support
Yes I agree, that's the main reason I went with enabling just JDBC Parameters, and not the full syntax or expressions/subqueries, to minimize the scope of impact.
While this is not strictly part of JDBC/PG grammar, I think supporting placeholders throughout all parts of SQL queries could be valuable for this library, as developers commonly use templated queries. Currently, JSQLParser supports placeholders only in certain cases (like JDBC), which might be confusing. I completely understand though if you think it may not be a good fit. I appreciate the thought and time you've put into it. |
I thought as much and for me this speaks against merging this change.
Template engine or even a plain Java Message Builder will resolve any variable like I value and appreciate your work, interest and contribution but I feel we are on the wrong path here. Please see #2199. |
That's completely fair, I appreciate the time you took to evaluate this PR, and it definitely sounds based on the vote that this implementation probably doesn't belong in the parser. I'll close this PR. Thanks again! |
Thank you for understanding. We could open a new Repository |
Adding support for JDBC parameters (
?
) in column data types, in precision and scale arguments, such as: