MCPcopy
hub / github.com/prisma/prisma / $runCommandRaw

Method $runCommandRaw

packages/client/src/runtime/getPrismaClient.ts:616–635  ·  view source on GitHub ↗

* Executes a raw command only for MongoDB * * @param command * @returns

(command: Record<string, JsInputValue>)

Source from the content-addressed store, hash-verified

614 * @returns
615 */
616 $runCommandRaw(command: Record<string, JsInputValue>) {
617 if (config.activeProvider !== 'mongodb') {
618 throw new PrismaClientValidationError(
619 `The ${config.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,
620 { clientVersion: this._clientVersion },
621 )
622 }
623
624 return this._createPrismaPromise((transaction) => {
625 return this._request({
626 args: command,
627 clientMethod: '$runCommandRaw',
628 dataPath: [],
629 action: 'runCommandRaw',
630 argsMapper: rawCommandArgsMapper,
631 callsite: getCallSite(this._errorFormat),
632 transaction: transaction,
633 })
634 })
635 }
636
637 /**
638 * Executes a raw query and returns selected data

Callers 9

tests.tsFile · 0.80
tests.tsFile · 0.80
tests.tsFile · 0.80
client.tsFile · 0.80
query.tsFile · 0.80
defineExtension.tsFile · 0.80
tests.tsFile · 0.80
tests.tsFile · 0.80
tests.tsFile · 0.80

Calls 2

_requestMethod · 0.95
getCallSiteFunction · 0.90

Tested by

no test coverage detected