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

Method _getFunctions

lib/metadata/index.js:686–699  ·  view source on GitHub ↗

* Gets a map of cql function definitions or aggregates based on signature. * @param {String} keyspaceName * @param {String} name Name of the function or aggregate * @param {Boolean} aggregate * @returns {Promise } * @private

(keyspaceName, name, aggregate)

Source from the content-addressed store, hash-verified

684 * @private
685 */
686 async _getFunctions(keyspaceName, name, aggregate) {
687 if (!this.initialized) {
688 throw this._uninitializedError();
689 }
690 let cache;
691 if (this.options.isMetadataSyncEnabled) {
692 const keyspace = this.keyspaces[keyspaceName];
693 if (!keyspace) {
694 return new Map();
695 }
696 cache = aggregate ? keyspace.aggregates : keyspace.functions;
697 }
698 return await this._schemaParser.getFunctions(keyspaceName, name, aggregate, cache);
699 }
700
701 /**
702 * Gets a single cql function or aggregate definition

Callers 3

_getFunctionsWrapperMethod · 0.95
_getAggregatesMethod · 0.95
_getSingleFunctionMethod · 0.95

Calls 2

_uninitializedErrorMethod · 0.95
getFunctionsMethod · 0.65

Tested by

no test coverage detected