Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions cassandra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = {
Expand All @@ -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
}


Expand Down