You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by yu...@apache.org on 2016/03/07 23:18:48 UTC

cassandra git commit: (cqlsh) Show static columns in a different color

Repository: cassandra
Updated Branches:
  refs/heads/trunk 615d0e155 -> ab793c7f3


(cqlsh) Show static columns in a different color

patch by Pavel Trukhanov; reviewed by yukim for CASSANDRA-11059


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ab793c7f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ab793c7f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ab793c7f

Branch: refs/heads/trunk
Commit: ab793c7f3bdc17a8de584d0910aa9f5c4978dfa0
Parents: 615d0e1
Author: Pavel Trukhanov <pa...@gmail.com>
Authored: Thu Mar 3 14:58:35 2016 +0300
Committer: Yuki Morishita <yu...@apache.org>
Committed: Mon Mar 7 16:15:42 2016 -0600

----------------------------------------------------------------------
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ab793c7f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 03891f3..cd9d8d9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.6
+ * (cqlsh) Show static columns in a different color (CASSANDRA-11059)
  * Allow to remove TTLs on table with default_time_to_live (CASSANDRA-11207)
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ab793c7f/bin/cqlsh.py
----------------------------------------------------------------------
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index 78fedeb..71a5fcb 100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -169,7 +169,7 @@ if os.path.isdir(cqlshlibdir):
 from cqlshlib import cql3handling, cqlhandling, pylexotron, sslhandling
 from cqlshlib.copyutil import ExportTask, ImportTask
 from cqlshlib.displaying import (ANSI_RESET, BLUE, COLUMN_NAME_COLORS, CYAN,
-                                 RED, FormattedValue, colorme)
+                                 RED, WHITE, FormattedValue, colorme)
 from cqlshlib.formatting import (DEFAULT_DATE_FORMAT, DEFAULT_NANOTIME_FORMAT,
                                  DEFAULT_TIMESTAMP_FORMAT, DateTimeFormat,
                                  format_by_type, format_value_utype,
@@ -841,6 +841,8 @@ class Shell(cmd.Cmd):
                 column_colors.default_factory = lambda: RED
             elif name in [col.name for col in table_meta.clustering_key]:
                 column_colors.default_factory = lambda: CYAN
+            elif name in table_meta.columns and table_meta.columns[name].is_static:
+                column_colors.default_factory = lambda: WHITE
         return self.myformat_value(name, colormap=column_colors)
 
     def report_connection(self):