mirror of https://github.com/apache/cassandra
(cqlsh) Show static columns in a different color
patch by Pavel Trukhanov; reviewed by yukim for CASSANDRA-11059
This commit is contained in:
parent
615d0e1555
commit
ab793c7f3b
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue