* 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)
| 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 |
no test coverage detected