-
Notifications
You must be signed in to change notification settings - Fork 62
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
Ability to modify SQL keyword list #719
Comments
Hi @mustafaakin, we discussed this as a team, and it's a feature request that we are certainly interested in pursuing in the future. I can't say exactly when we'd implement this, but we actually have discussed to a certain degree how we can implement this with the upcoming PartiQLParser, a new implementation of Parser -- see #711. Linking the PR because it would subtantially decrease the time to roll this feature out. SQL has reserved and non-reserved keywords, and I believe |
Update: PostgreSQL has a list of reserved vs non-reserved keywords on their website. According to their implementation, |
For now, we've forked CREATE TABLE tmp3 (
"user" TEXT,
public BOOLEAN,
domain TEXT
);
INSERT INTO tmp3 VALUES('mustafa', true, 'resmo.com');
SELECT * FROM tmp3 WHERE user = 'mustafa'; <-- does not match because SQL user is resmo
SELECT * FROM tmp3 WHERE "user" = 'mustafa';
SELECT * FROM tmp3 WHERE public AND domain = 'resmo.com' |
BTW @mustafaakin -- I created the above PR to add this to the new default parser (PartiQLParser). Should be extremely easy to modify the list of non-reserved keywords once it's merged. |
Hi @johnedquinn Is there any update on this? |
I know keywords come from the spec, however the popular words like
domain
,user
,public
is not actually useful in this library, not used in any way but we need to escape them asSELECT * FROM "user"
which does not look nice. Would you consider the ability to customize that list as an advanced, somewhat hidden feature?partiql-lang-kotlin/lang/src/org/partiql/lang/syntax/LexerConstants.kt
Line 30 in e455cf4
The text was updated successfully, but these errors were encountered: