MCPcopy Index your code
hub / github.com/cloudreve/cloudreve / GetNodeById

Method GetNodeById

inventory/node.go:67–69  ·  view source on GitHub ↗
(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

65}
66
67func (c *nodeClient) GetNodeById(ctx context.Context, id int) (*ent.Node, error) {
68 return withNodeEagerLoading(ctx, c.client.Node.Query().Where(node.IDEQ(id))).First(ctx)
69}
70
71func (c *nodeClient) Delete(ctx context.Context, id int) error {
72 return c.client.Node.DeleteOneID(id).Exec(ctx)

Callers

nothing calls this directly

Calls 5

IDEQFunction · 0.92
withNodeEagerLoadingFunction · 0.85
FirstMethod · 0.45
WhereMethod · 0.45
QueryMethod · 0.45

Tested by

no test coverage detected