Adding extra condition to the where clause when parsing SQL
See original GitHub issueI want to add an extra condition (a value stored in the local thread) to the where clause. Does the shardingsphere SQL parser or rewrite engine have any extension point or mechanism to let me do this? Thanks!
e.g. Origin SQL:
SELECT id, customer_id, product_id, ... FROM order;
Want to add an extra condition
SELECT id, customer_id, product_id, ... FROM order WHERE tenant = 'ABC';
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Conditional WHERE clauses in SQL - Avoid Smart Logic
Conditional WHERE clauses using “OR ... IS NULL” cause SQL performance problems. Don't try to outsmart the database.
Read more >Get and Add WHERE clause in SQL Query Python
I have these extra conditions which I want to apply to the query. So, the final query should become: SELECT device_os, count(*) FROM...
Read more >Parse a valid WHERE clause syntax using PL/SQL - Ask TOM
Parse a valid WHERE clause syntax using PL/SQL I have a predicate column in a table which stores a text which must be...
Read more >Functions for Use in SELECT and WHERE Clauses - O'Reilly
A select_expression or where_definition in a SQL statement can consist of any expression using the functions described next.
Read more >Using the WHERE clause to filter data in SQL
The WHERE clause allows us to set the conditions by which rows are fetched from data tables. A condition is some kind of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I will do some research and PoC, will back later
Since this issue has been inactive for more than 1 year, we will close it. If you still have related questions, please submit a new issue, thank you.