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

Feature request: Add truncate/empty collection support #631

Closed
chrislatimer opened this issue Nov 10, 2023 · 3 comments · Fixed by #658
Closed

Feature request: Add truncate/empty collection support #631

chrislatimer opened this issue Nov 10, 2023 · 3 comments · Fixed by #658
Assignees

Comments

@chrislatimer
Copy link

Please add a truncate operation equivalent to the CQL truncate table operation.

@amorton
Copy link
Contributor

amorton commented Nov 13, 2023

this should work as a deleteMany command with an empty or undefined filter, i.e.

{"deleteMany" : {
    "filter": {}
}}

// same as 
{"deleteMany" : {}}

When the API gets a deleteMany with no filter it will issue a CQL Truncate. This command will delete all rows in the table and leave the table in place.

@Hazel-Datastax updated as discussed in meetings.

@maheshrajamani
Copy link
Contributor

this should work as a deleteMany command with an empty or undefined filter

@amorton deleteMany command response returns number of document deleted. When we truncate table using cql truncate command we will not able able to provide this. Can we create a new command truncate() for this?

@amorton
Copy link
Contributor

amorton commented Nov 20, 2023

@maheshrajamani and @Hazel-Datastax lets turn -1 for "all" records

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants