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

Function getConsistencyName

lib/datastax/graph/options.js:181–195  ·  view source on GitHub ↗

* Gets the name in upper case of the consistency level. * @param {Number} consistency * @private

(consistency)

Source from the content-addressed store, hash-verified

179 * @private
180 */
181function getConsistencyName(consistency) {
182 // eslint-disable-next-line
183 if (consistency == undefined) {
184 //null or undefined => undefined
185 return undefined;
186 }
187 loadConsistencyNames();
188 const name = consistencyNames[consistency];
189 if (!name) {
190 throw new Error(util.format(
191 'Consistency %s not found, use values defined as properties in types.consistencies object', consistency
192 ));
193 }
194 return name;
195}
196
197function loadConsistencyNames() {
198 if (consistencyNames) {

Callers 2

getDefaultGraphOptionsFunction · 0.85
setGraphPayloadMethod · 0.85

Calls 1

loadConsistencyNamesFunction · 0.85

Tested by

no test coverage detected