MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / getMulti

Function getMulti

packages/hydrooj/src/model/document.ts:141–147  ·  view source on GitHub ↗
(
    domainId: string, docType: K, query?: Filter<DocType[K]>, projection?: Projection<DocType[K]>,
)

Source from the content-addressed store, hash-verified

139}
140
141export function getMulti<K extends keyof DocType>(
142 domainId: string, docType: K, query?: Filter<DocType[K]>, projection?: Projection<DocType[K]>,
143): FindCursor<DocType[K]> {
144 let cursor = coll.find({ docType, domainId, ...query });
145 if (projection) cursor = cursor.project(buildProjection(projection));
146 return cursor;
147}
148
149export async function inc<K extends keyof DocType>(
150 domainId: string, docType: K, docId: DocType[K]['docId'],

Callers

nothing calls this directly

Calls 2

buildProjectionFunction · 0.90
findMethod · 0.80

Tested by

no test coverage detected