MCPcopy
hub / github.com/prisma/prisma / getNextDataPath

Function getNextDataPath

packages/client/src/runtime/core/model/applyFluent.ts:20–24  ·  view source on GitHub ↗

* The fluent API makes that nested relations can be retrieved at once. It's a * helper for writing `select` statements on relations with a chaining api. * Because of this, we automatically add `select` statements to the query, that * also means that we need to provide a `dataPath` for unpacking n

(fluentPropName?: string, prevDataPath?: string[])

Source from the content-addressed store, hash-verified

18 * @returns
19 */
20function getNextDataPath(fluentPropName?: string, prevDataPath?: string[]) {
21 if (fluentPropName === undefined || prevDataPath === undefined) return []
22
23 return [...prevDataPath, 'select', fluentPropName]
24}
25
26/**
27 * @see {getNextDataPath} for introduction. The goal of the fluent API is to

Callers 1

applyFluentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected