MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / makeIdSelect

Method makeIdSelect

packages/server/src/api/rest/index.ts:2114–2119  ·  view source on GitHub ↗
(idFields: FieldDef[])

Source from the content-addressed store, hash-verified

2112 }
2113
2114 private makeIdSelect(idFields: FieldDef[]) {
2115 if (idFields.length === 0) {
2116 throw this.errors['noId'];
2117 }
2118 return idFields.reduce((acc, curr) => ({ ...acc, [curr.name]: true }), {});
2119 }
2120
2121 private makeIdConnect(idFields: FieldDef[], id: string | number) {
2122 if (idFields.length === 1) {

Callers 8

buildPartialSelectMethod · 0.95
existsFunction · 0.80
disconnectRelationFunction · 0.80
getEntityIdsFunction · 0.80
getEntitiesIdsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected