MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / get_default_protocol

Function get_default_protocol

tests/integration/__init__.py:225–243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223
224
225def get_default_protocol():
226 if CASSANDRA_VERSION >= Version('4.0-a'):
227 if DSE_VERSION:
228 return ProtocolVersion.DSE_V2
229 else:
230 return ProtocolVersion.V5
231 if CASSANDRA_VERSION >= Version('3.10'):
232 if DSE_VERSION:
233 return ProtocolVersion.DSE_V1
234 else:
235 return 4
236 if CASSANDRA_VERSION >= Version('2.2'):
237 return 4
238 elif CASSANDRA_VERSION >= Version('2.1'):
239 return 3
240 elif CASSANDRA_VERSION >= Version('2.0'):
241 return 2
242 else:
243 raise Exception("Running tests with an unsupported Cassandra version: {0}".format(CASSANDRA_VERSION))
244
245
246def get_supported_protocol_versions():

Callers 1

__init__.pyFile · 0.85

Calls 1

VersionClass · 0.85

Tested by

no test coverage detected