MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / loadConsistencyNames

Function loadConsistencyNames

lib/datastax/graph/options.js:197–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195}
196
197function loadConsistencyNames() {
198 if (consistencyNames) {
199 return;
200 }
201 consistencyNames = {};
202 const propertyNames = Object.keys(types.consistencies);
203 for (let i = 0; i < propertyNames.length; i++) {
204 const name = propertyNames[i];
205 consistencyNames[types.consistencies[name]] = name.toUpperCase();
206 }
207 //Using java constants naming conventions
208 consistencyNames[types.consistencies.localQuorum] = 'LOCAL_QUORUM';
209 consistencyNames[types.consistencies.eachQuorum] = 'EACH_QUORUM';
210 consistencyNames[types.consistencies.localSerial] = 'LOCAL_SERIAL';
211 consistencyNames[types.consistencies.localOne] = 'LOCAL_ONE';
212}
213
214/**
215 * Represents a wrapper around the options related to a graph execution.

Callers 1

getConsistencyNameFunction · 0.85

Calls 1

keysMethod · 0.65

Tested by

no test coverage detected