MCPcopy
hub / github.com/eveningkid/denodb / _runQuery

Method _runQuery

lib/model.ts:221–235  ·  view source on GitHub ↗

Build the current query and run it on the associated database.

(query: QueryDescription)

Source from the content-addressed store, hash-verified

219
220 /** Build the current query and run it on the associated database. */
221 private static async _runQuery(query: QueryDescription) {
222 this._currentQuery = this._queryBuilder.queryForSchema(this);
223
224 if (query.type) {
225 this._runEventListeners(query.type);
226 }
227
228 const results = await this._database.query(query);
229
230 if (query.type) {
231 this._runEventListeners(query.type, results);
232 }
233
234 return results;
235 }
236
237 /** Format a field or an object of fields, following a field matching table.
238 * Defaulting to `defaultCase` or `field` otherwise. */

Callers 11

getMethod · 0.95
createMethod · 0.95
findMethod · 0.95
updateMethod · 0.95
deleteByIdMethod · 0.95
deleteMethod · 0.95
countMethod · 0.95
minMethod · 0.95
maxMethod · 0.95
sumMethod · 0.95
avgMethod · 0.95

Calls 3

_runEventListenersMethod · 0.95
queryForSchemaMethod · 0.80
queryMethod · 0.65

Tested by

no test coverage detected