mistic100 / mistic100/jQuery-QueryBuilder
Feature request: plugins.sql-support avoid quote the string on user demand.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 544
- PR merge metrics
- No merged PRs in 30d
Description
If we are loading as values a set of table.columns values from a database like occurs in: https://github.com/mistic100/jQuery-QueryBuilder/issues/221, our values are string, but we want get it without quotes, because are columns not statistic values.
This is current impossible to handled in the getSql method because it just check for the value type:
https://github.com/mistic100/jQuery-QueryBuilder/blob/73cb350b57610d2632e1eda4bb52c27195a303af/src/plugins/sql-support/plugin.js#L321-L323
One idea is add a new sqlStatements that check for a variable in the current rule and with base on that disable the quote for that rule or not. Then the user can set that value in the rule on demand. But we can not add by our self an sqlStatements on demand. Also the usage of an sqlStatements in a standard sql have not semantic sense.
So, a solution, a workaround, an idea?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/plugins/sql-support/plugin.js, especially lines 321-323, and read the linked jQuery Query Builder issue for the motivating case. Clarify how a rule should distinguish column identifiers from literal strings and what SQL output is expected in each case; done means the user-facing behavior and implementation approach are agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, sql
- Domain
- databases, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100