forked from apache/cassandra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
new_features.txt
60 lines (39 loc) · 1.74 KB
/
new_features.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Following are the features which i have added with sligh modifications and additions in original code :-
1. Bash-like Aliases with full autocompletion support, custom aliases, listing aliases.
cassandra@cqlsh> show
; <enter> ALIASES HOST SESSION VERSION
cassandra@cqlsh> show ALIASES ;
Aliases :> {'dk': 'desc keyspaces;', 'sl': 'select * from'}
now if you type dk and press <tab> it will auto complete it to "desc keyspace".
Adding alias
From shell :-
cassandra@cqlsh> alias slu=select * from login.user ;
Alias added successfully - sle:select * login.user ;
cassandra@cqlsh> show ALIASES ;
Aliases :> {'slu': 'select * from login.user ;', 'dk': 'desc keyspaces;', 'sl': 'select * from'}
cassandra@cqlsh> sle
Expanded alias to> select * from login.user ;
username | blacklisted | lastlogin | password
Directly in file :-
aliases will be kept in same cqlshrc file.
[aliases]
dk = desc keyspaces;
sl = select * from
sle = select * from login.user ;
now if you type just "sle" it will autocomplete rest of it and show next options.
2. Prompt on destructive operations. It's inspired from elasticsearch - https://github.com/elastic/elasticsearch/issues/4549 . I think we should have it in production atleast.
in cqlshrc :-
[misc]
safe_mode = true
if this mode is true, we will get prompted (y/n?) before the action is performed.
.
cassandra@cqlsh> truncate login.user ;
Are you sure you want to do this? (y/n) > n
Not performing any action.
cassandra@cqlsh> delete from login.user where username = 'v';
Are you sure you want to do this? (y/n) > n
Cancelled deletion.
cassandra@cqlsh> updatee login.user set password=null;
Are you sure you want to do this? (y/n) > n
Not performing any action.
3. Press q to exit :D