Stefan Miklosovic created CASSANDRA-20761:
---------------------------------------------
Summary: Support TRUNCATE <keyspace> to truncate all tables in it
Key: CASSANDRA-20761
URL: https://issues.apache.org/jira/browse/CASSANDRA-20761
Project: Apache Cassandra
Issue Type: New Feature
Components: CQL/Semantics
Reporter: Stefan Miklosovic
If I want to truncate whole keyspace by one command, now I can not do that as I
need to enumerate all tables from that keyspace and truncate one by one.
It might be probably possible to do
{code}
TRUNCATE keyspace_name
{code}
which would internally iterate over all tables and truncate them all so user is
saved from doing that.
However, I think that the usage of
{code}
TRUNCATE keyspace_name
{code}
is a little bit risky because, for example, users might think that they are
using keyspace already by USE statement so "keyspace_name" is actually a table
name. If there is a keyspace of such name then it would truncate all tables in
it.
It would be probably better to have a new statement like
{code}
TRUNCATE KEYSPACE abc;
{code}
That way, it is pretty obvious what we want to truncate.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]