-
Notifications
You must be signed in to change notification settings - Fork 4
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
[RFC] [DML] INSERT, UPSERT, and REPLACE #11
Conversation
44ace81
to
c0c0041
Compare
33d17d3
to
ce9da82
Compare
64b5189
to
40f8dc6
Compare
8b4dd98
to
1668d8a
Compare
cce7f79
to
745f7c9
Compare
39fcae0
to
09315bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good--I do have a concern with DEFAULT
that we should decide on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hard work on this--looks good.
89e7dd0
to
470cf94
Compare
- Replace double quotes w/ single quotes - Move DEFAULT for omitted attributes from MUST to MAY - Add a comment about addition of attribute - Add an example for closed -> open schema - Clarify referencing a missing value during on-conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good Arash, thanks for patiently working through the comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- oops, duplicate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good--minor edit suggested below, but not required if you think it too wordy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```EBNF | ||
<insert statement> ::= INSERT INTO <table name> [ AS <alias> ] | ||
[ ( <attr name> [, <attr name> ]... ) ] | ||
<values> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a post-merge comment here: Since we use EXCLUDED
as a variable name that references a value to be inserted, we could alternatively propose a follow-up RFC that specifies the syntax to allow an alias for the value to be inserted. Such as:
<insert statement> ::= INSERT INTO <table name> [ AS <alias> ]
[ ( <attr name> [, <attr name> ]... ) ]
<values> [ AS <alias> ]
...
Note the [ AS <alias> ]
after <values>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnedquinn it's an intriguing idea: what do you consider the value it brings in addition to EXCLUDED
?
Issue #, if available: #4
Description of changes:
This PR includes the RFC text for addition of PartiQL
INSERT
andUPDATE
specification.rendered markdown file
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.