You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mi...@apache.org on 2014/02/22 00:41:50 UTC
[01/10] git commit: Completer shall always return a collection
Repository: cassandra
Updated Branches:
refs/heads/cassandra-1.2 b68493751 -> dceca93b7
refs/heads/cassandra-2.0 458965673 -> 50e544f28
refs/heads/cassandra-2.1 143372bf7 -> 0508a155e
refs/heads/trunk a896d0fe3 -> febd6e159
Completer shall always return a collection
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dceca93b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dceca93b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dceca93b
Branch: refs/heads/cassandra-1.2
Commit: dceca93b79654d8b4aa5c26580778a053c5a4862
Parents: b684937
Author: Mikhail Stepura <mi...@apache.org>
Authored: Fri Feb 21 15:38:49 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Feb 21 15:38:49 2014 -0800
----------------------------------------------------------------------
pylib/cqlshlib/cql3handling.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/dceca93b/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index b9265fd..50e2015 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -908,7 +908,7 @@ def update_countername_completer(ctxt, cass):
cqltype = layout.get_column(curcol).cqltype
coltype = cqltype.typename
if coltype == 'counter':
- return maybe_escape_name(curcol)
+ return [maybe_escape_name(curcol)]
if coltype in ('map', 'set'):
return ["{"]
if coltype == 'list':
@@ -926,7 +926,7 @@ def update_counter_inc_completer(ctxt, cass):
layout = get_cf_layout(ctxt, cass)
curcol = dequote_name(ctxt.get_binding('updatecol', ''))
if layout.is_counter_col(curcol):
- return Hint('<wholenumber>')
+ return [Hint('<wholenumber>')]
return []
@completer_for('assignment', 'listadder')
@@ -934,6 +934,7 @@ def update_listadder_completer(ctxt, cass):
rhs = ctxt.get_binding('update_rhs')
if rhs.startswith('['):
return ['+']
+ return []
@completer_for('assignment', 'listcol')
def update_listcol_completer(ctxt, cass):
[09/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Posted by mi...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0508a155
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0508a155
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0508a155
Branch: refs/heads/trunk
Commit: 0508a155e5eec3ec89d02fa0b6a1dd05f86a4f82
Parents: 143372b 50e544f
Author: Mikhail Stepura <mi...@apache.org>
Authored: Fri Feb 21 15:39:59 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Feb 21 15:39:59 2014 -0800
----------------------------------------------------------------------
pylib/cqlshlib/cql3handling.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/0508a155/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --cc pylib/cqlshlib/cql3handling.py
index 093354a,5fe96bb..6c53717
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@@ -1235,31 -1170,3 +1236,31 @@@ class CqlTableDef
def __str__(self):
return '<%s %s.%s>' % (self.__class__.__name__, self.keyspace, self.name)
__repr__ = __str__
+
+class UserTypesMeta(object):
+ _meta = {}
+
+ def __init__(self, meta):
+ self._meta = meta
+
+ @classmethod
+ def from_layout(cls, layout):
+ result = {}
+ for row in layout:
+ ksname = row[u'keyspace_name']
+ if ksname not in result:
+ result[ksname] = {}
+ utname = row[u'type_name']
+
+ result[ksname][utname] = zip(row[u'column_names'], row[u'column_types'])
+ return cls(meta=result)
+
+ def get_usertypes_names(self, keyspace):
+ return map(str, self._meta.get(keyspace, {}).keys())
+
+ def get_field_names(self, keyspace, type):
+ return [row[0] for row in self._meta.get(keyspace, {}).get(type, [])]
+
+ def get_fields_with_types(self, ksname, typename):
+ return [(field[0], lookup_casstype(field[1]).cql_parameterized_type()) for field in
- self._meta.get(ksname, {}).get(typename, [])]
++ self._meta.get(ksname, {}).get(typename, [])]
[05/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Posted by mi...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/50e544f2
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/50e544f2
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/50e544f2
Branch: refs/heads/cassandra-2.1
Commit: 50e544f28239d8547dcdee575ec71efc9c8d2a26
Parents: 4589656 dceca93
Author: Mikhail Stepura <mi...@apache.org>
Authored: Fri Feb 21 15:39:34 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Feb 21 15:39:34 2014 -0800
----------------------------------------------------------------------
pylib/cqlshlib/cql3handling.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/50e544f2/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
[06/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Posted by mi...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/50e544f2
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/50e544f2
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/50e544f2
Branch: refs/heads/cassandra-2.0
Commit: 50e544f28239d8547dcdee575ec71efc9c8d2a26
Parents: 4589656 dceca93
Author: Mikhail Stepura <mi...@apache.org>
Authored: Fri Feb 21 15:39:34 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Feb 21 15:39:34 2014 -0800
----------------------------------------------------------------------
pylib/cqlshlib/cql3handling.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/50e544f2/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
[04/10] git commit: Completer shall always return a collection
Posted by mi...@apache.org.
Completer shall always return a collection
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dceca93b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dceca93b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dceca93b
Branch: refs/heads/trunk
Commit: dceca93b79654d8b4aa5c26580778a053c5a4862
Parents: b684937
Author: Mikhail Stepura <mi...@apache.org>
Authored: Fri Feb 21 15:38:49 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Feb 21 15:38:49 2014 -0800
----------------------------------------------------------------------
pylib/cqlshlib/cql3handling.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/dceca93b/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index b9265fd..50e2015 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -908,7 +908,7 @@ def update_countername_completer(ctxt, cass):
cqltype = layout.get_column(curcol).cqltype
coltype = cqltype.typename
if coltype == 'counter':
- return maybe_escape_name(curcol)
+ return [maybe_escape_name(curcol)]
if coltype in ('map', 'set'):
return ["{"]
if coltype == 'list':
@@ -926,7 +926,7 @@ def update_counter_inc_completer(ctxt, cass):
layout = get_cf_layout(ctxt, cass)
curcol = dequote_name(ctxt.get_binding('updatecol', ''))
if layout.is_counter_col(curcol):
- return Hint('<wholenumber>')
+ return [Hint('<wholenumber>')]
return []
@completer_for('assignment', 'listadder')
@@ -934,6 +934,7 @@ def update_listadder_completer(ctxt, cass):
rhs = ctxt.get_binding('update_rhs')
if rhs.startswith('['):
return ['+']
+ return []
@completer_for('assignment', 'listcol')
def update_listcol_completer(ctxt, cass):
[08/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Posted by mi...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0508a155
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0508a155
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0508a155
Branch: refs/heads/cassandra-2.1
Commit: 0508a155e5eec3ec89d02fa0b6a1dd05f86a4f82
Parents: 143372b 50e544f
Author: Mikhail Stepura <mi...@apache.org>
Authored: Fri Feb 21 15:39:59 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Feb 21 15:39:59 2014 -0800
----------------------------------------------------------------------
pylib/cqlshlib/cql3handling.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/0508a155/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --cc pylib/cqlshlib/cql3handling.py
index 093354a,5fe96bb..6c53717
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@@ -1235,31 -1170,3 +1236,31 @@@ class CqlTableDef
def __str__(self):
return '<%s %s.%s>' % (self.__class__.__name__, self.keyspace, self.name)
__repr__ = __str__
+
+class UserTypesMeta(object):
+ _meta = {}
+
+ def __init__(self, meta):
+ self._meta = meta
+
+ @classmethod
+ def from_layout(cls, layout):
+ result = {}
+ for row in layout:
+ ksname = row[u'keyspace_name']
+ if ksname not in result:
+ result[ksname] = {}
+ utname = row[u'type_name']
+
+ result[ksname][utname] = zip(row[u'column_names'], row[u'column_types'])
+ return cls(meta=result)
+
+ def get_usertypes_names(self, keyspace):
+ return map(str, self._meta.get(keyspace, {}).keys())
+
+ def get_field_names(self, keyspace, type):
+ return [row[0] for row in self._meta.get(keyspace, {}).get(type, [])]
+
+ def get_fields_with_types(self, ksname, typename):
+ return [(field[0], lookup_casstype(field[1]).cql_parameterized_type()) for field in
- self._meta.get(ksname, {}).get(typename, [])]
++ self._meta.get(ksname, {}).get(typename, [])]
[02/10] git commit: Completer shall always return a collection
Posted by mi...@apache.org.
Completer shall always return a collection
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dceca93b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dceca93b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dceca93b
Branch: refs/heads/cassandra-2.0
Commit: dceca93b79654d8b4aa5c26580778a053c5a4862
Parents: b684937
Author: Mikhail Stepura <mi...@apache.org>
Authored: Fri Feb 21 15:38:49 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Feb 21 15:38:49 2014 -0800
----------------------------------------------------------------------
pylib/cqlshlib/cql3handling.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/dceca93b/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index b9265fd..50e2015 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -908,7 +908,7 @@ def update_countername_completer(ctxt, cass):
cqltype = layout.get_column(curcol).cqltype
coltype = cqltype.typename
if coltype == 'counter':
- return maybe_escape_name(curcol)
+ return [maybe_escape_name(curcol)]
if coltype in ('map', 'set'):
return ["{"]
if coltype == 'list':
@@ -926,7 +926,7 @@ def update_counter_inc_completer(ctxt, cass):
layout = get_cf_layout(ctxt, cass)
curcol = dequote_name(ctxt.get_binding('updatecol', ''))
if layout.is_counter_col(curcol):
- return Hint('<wholenumber>')
+ return [Hint('<wholenumber>')]
return []
@completer_for('assignment', 'listadder')
@@ -934,6 +934,7 @@ def update_listadder_completer(ctxt, cass):
rhs = ctxt.get_binding('update_rhs')
if rhs.startswith('['):
return ['+']
+ return []
@completer_for('assignment', 'listcol')
def update_listcol_completer(ctxt, cass):
[03/10] git commit: Completer shall always return a collection
Posted by mi...@apache.org.
Completer shall always return a collection
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dceca93b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dceca93b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dceca93b
Branch: refs/heads/cassandra-2.1
Commit: dceca93b79654d8b4aa5c26580778a053c5a4862
Parents: b684937
Author: Mikhail Stepura <mi...@apache.org>
Authored: Fri Feb 21 15:38:49 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Feb 21 15:38:49 2014 -0800
----------------------------------------------------------------------
pylib/cqlshlib/cql3handling.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/dceca93b/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index b9265fd..50e2015 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -908,7 +908,7 @@ def update_countername_completer(ctxt, cass):
cqltype = layout.get_column(curcol).cqltype
coltype = cqltype.typename
if coltype == 'counter':
- return maybe_escape_name(curcol)
+ return [maybe_escape_name(curcol)]
if coltype in ('map', 'set'):
return ["{"]
if coltype == 'list':
@@ -926,7 +926,7 @@ def update_counter_inc_completer(ctxt, cass):
layout = get_cf_layout(ctxt, cass)
curcol = dequote_name(ctxt.get_binding('updatecol', ''))
if layout.is_counter_col(curcol):
- return Hint('<wholenumber>')
+ return [Hint('<wholenumber>')]
return []
@completer_for('assignment', 'listadder')
@@ -934,6 +934,7 @@ def update_listadder_completer(ctxt, cass):
rhs = ctxt.get_binding('update_rhs')
if rhs.startswith('['):
return ['+']
+ return []
@completer_for('assignment', 'listcol')
def update_listcol_completer(ctxt, cass):
[07/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Posted by mi...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/50e544f2
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/50e544f2
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/50e544f2
Branch: refs/heads/trunk
Commit: 50e544f28239d8547dcdee575ec71efc9c8d2a26
Parents: 4589656 dceca93
Author: Mikhail Stepura <mi...@apache.org>
Authored: Fri Feb 21 15:39:34 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Feb 21 15:39:34 2014 -0800
----------------------------------------------------------------------
pylib/cqlshlib/cql3handling.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/50e544f2/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
[10/10] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by mi...@apache.org.
Merge branch 'cassandra-2.1' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/febd6e15
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/febd6e15
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/febd6e15
Branch: refs/heads/trunk
Commit: febd6e159d8c02e06f4f4025297b9dbd04ee71ec
Parents: a896d0f 0508a15
Author: Mikhail Stepura <mi...@apache.org>
Authored: Fri Feb 21 15:40:30 2014 -0800
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Feb 21 15:40:30 2014 -0800
----------------------------------------------------------------------
pylib/cqlshlib/cql3handling.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------