Normalize cqlsh DESC output

patch by Adam Holmberg; reviewed by Benjamin Lerer for CASSANDRA-10431
This commit is contained in:
Adam Holmberg 2015-12-02 11:23:50 +01:00 committed by Benjamin Lerer
parent ad84add726
commit bcdbb0eb94
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,5 @@
3.0.1
* Normalize cqlsh DESC output (CASSANDRA-10431)
* Rejects partition range deletions when columns are specified (CASSANDRA-10739)
* Fix error when saving cached key for old format sstable (CASSANDRA-10778)
* Invalidate prepared statements on DROP INDEX (CASSANDRA-10758)

View File

@ -1546,7 +1546,7 @@ class Shell(cmd.Cmd):
functions = filter(lambda f: f.name == functionname, ksmeta.functions.values())
if len(functions) == 0:
raise FunctionNotFound("User defined function %r not found" % functionname)
print "\n\n".join(func.as_cql_query(formatted=True) for func in functions)
print "\n\n".join(func.export_as_string() for func in functions)
print
def describe_aggregates(self, ksname):
@ -1573,7 +1573,7 @@ class Shell(cmd.Cmd):
aggregates = filter(lambda f: f.name == aggregatename, ksmeta.aggregates.values())
if len(aggregates) == 0:
raise FunctionNotFound("User defined aggregate %r not found" % aggregatename)
print "\n\n".join(aggr.as_cql_query(formatted=True) for aggr in aggregates)
print "\n\n".join(aggr.export_as_string() for aggr in aggregates)
print
def describe_usertypes(self, ksname):
@ -1601,7 +1601,7 @@ class Shell(cmd.Cmd):
usertype = ksmeta.user_types[typename]
except KeyError:
raise UserTypeNotFound("User type %r not found" % typename)
print usertype.as_cql_query(formatted=True)
print usertype.export_as_string()
print
def describe_cluster(self):