taozhi8833998 / taozhi8833998/node-sql-parser

feature: add option into astify etc methods to avoid detect databasename or table name

Open
#2,007 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PEG.js
Stars
1k
Forks
244
PR merge metrics
No merged PRs in 30d

Description

I have a case is using node-sql-parser astify method to parse a sql where condition
but I found when the where condition looks like below:
select * from dummy_table where contacts.email.address === 'xxx@test.com',
then the contacts will be reconized as thte database and email as the table name
this is a handy process but not work for my case
I want to keep the column name as 'contacts.email.address'
Hope you can add this feature.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the astify and related methods described in the issue, then inspect how a dotted expression is classified as database, table, or column. Define the option's behavior for preserving contacts.email.address and verify that normal database and table detection still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, sql
Domain
backend-api-design, compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.