Skip to content
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

Support insert/update/delete statements for batch operations #8

Open
thomaslevesque opened this issue Jan 23, 2019 · 0 comments
Open
Labels
area: data manipulation Querying, updating, etc enhancement New feature or request feature group: DSL Enhance Cosmos SQL syntax with a DSL for mass update, delete, parameters, request options, etc priority: low

Comments

@thomaslevesque
Copy link
Owner

thomaslevesque commented Jan 23, 2019

As a pseudo-SQL language, parsed and translated to :

  • document creation for insert statements
  • query-then-update for update statements
  • query-then-delete for delete operations

e.g.:

insert into c { name: 'foo', price: 123.0 }
update c set c.answer = 42 where c.question = 'life, the universe and everything'
delete c where c.expirationDate < '2019-01-01T00:00:00'

(exact syntax tbd)

Request options should be supported, as specified in #2 (e.g. partition key, pre/post triggers...)

Bonus: optionally, create a temporary stored procedure to perform the operations atomically in a transaction (would fail if execution exceeds the provisioned throughput, e.g. if too many documents are affected)

@thomaslevesque thomaslevesque added enhancement New feature or request priority: low labels Jan 23, 2019
@thomaslevesque thomaslevesque changed the title Support update/delete statements for batch operations Support insert/update/delete statements for batch operations Jan 23, 2019
@thomaslevesque thomaslevesque added the area: data manipulation Querying, updating, etc label Jan 23, 2019
@thomaslevesque thomaslevesque added the feature group: DSL Enhance Cosmos SQL syntax with a DSL for mass update, delete, parameters, request options, etc label Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: data manipulation Querying, updating, etc enhancement New feature or request feature group: DSL Enhance Cosmos SQL syntax with a DSL for mass update, delete, parameters, request options, etc priority: low
Projects
None yet
Development

No branches or pull requests

1 participant