diff --git a/cassandra/__init__.py b/cassandra/__init__.py index badefb29d..3fba9337c 100644 --- a/cassandra/__init__.py +++ b/cassandra/__init__.py @@ -92,6 +92,11 @@ class ConsistencyLevel(object): one response. """ + NODE_LOCAL = 11 + """ + Experimental consistency level for querying only the local node. + """ + @staticmethod def is_serial(cl): return cl == ConsistencyLevel.SERIAL or cl == ConsistencyLevel.LOCAL_SERIAL @@ -108,7 +113,8 @@ def is_serial(cl): ConsistencyLevel.EACH_QUORUM: 'EACH_QUORUM', ConsistencyLevel.SERIAL: 'SERIAL', ConsistencyLevel.LOCAL_SERIAL: 'LOCAL_SERIAL', - ConsistencyLevel.LOCAL_ONE: 'LOCAL_ONE' + ConsistencyLevel.LOCAL_ONE: 'LOCAL_ONE', + ConsistencyLevel.NODE_LOCAL: 'NODE_LOCAL' } ConsistencyLevel.name_to_value = { @@ -122,7 +128,8 @@ def is_serial(cl): 'EACH_QUORUM': ConsistencyLevel.EACH_QUORUM, 'SERIAL': ConsistencyLevel.SERIAL, 'LOCAL_SERIAL': ConsistencyLevel.LOCAL_SERIAL, - 'LOCAL_ONE': ConsistencyLevel.LOCAL_ONE + 'LOCAL_ONE': ConsistencyLevel.LOCAL_ONE, + 'NODE_LOCAL': ConsistencyLevel.NODE_LOCAL }