axonops / axonops-workbench

AxonOps™ Workbench for Apache Cassandra® - Desktop application for Mac, Windows and Linux
https://axonops.com
Apache License 2.0
10 stars 0 forks source link

[feat]: add ability to disable CQL history globally, workspace or cluster level #281

Open millerjp opened 1 month ago

millerjp commented 1 month ago

We need to disable/enable CQL history being retained and keep it insync for CQLSH traditional console and AxonOps CQL console so this history setting can be managed in one place for both consoles.

AxonOps Console

Screenshot 2024-08-21 at 14 38 14

CQLSH

In CQLSH the CQL history in cqlsh for Apache Cassandra. There are a couple of ways to achieve this:

  1. Environment Variable: You can set the CQL_HISTORY environment variable to /dev/null. This will prevent the history from being saved to a file, effectively disabling it. This feature is supported from Cassandra version 4.1[2].

  2. Command Line Option: You can use the --disable-history option when starting cqlsh. This option explicitly disables the saving of command history[4].

  3. cqlshrc Configuration File: You can configure the cqlshrc file to disable history logging. By setting the [history] section to disabled = TRUE, you can prevent the history from being saved[5].

These methods allow you to manage the history settings of cqlsh according to your needs.

See: [1] https://issues.apache.org/jira/browse/CASSANDRA-19766 [2] https://cassandra.apache.org/doc/stable/cassandra/tools/cqlsh.html [3] https://stackoverflow.com/questions/35708522/how-can-i-change-the-cqlsh-cqlsh-history-log-file-location [4] https://awesome-astra.github.io/docs/pages/data/explore/cqlsh/ [5] https://docs.datastax.com/en/cql/hcd-1.0/reference/cqlsh-commands/cqlshrc.html