MCPcopy Create free account
hub / github.com/rilldata/rill / UpdateProjectInviteRole

Method UpdateProjectInviteRole

admin/database/postgres/postgres.go:2758–2766  ·  view source on GitHub ↗
(ctx context.Context, id, roleID string, restrictResources bool, resources []database.ResourceName)

Source from the content-addressed store, hash-verified

2756}
2757
2758func (c *connection) UpdateProjectInviteRole(ctx context.Context, id, roleID string, restrictResources bool, resources []database.ResourceName) error {
2759 resJSON, err := marshalResourceNames(resources)
2760 if err != nil {
2761 return err
2762 }
2763
2764 res, err := c.getDB(ctx).ExecContext(ctx, `UPDATE project_invites SET project_role_id = $1, restrict_resources = $3, resources = $4 WHERE id = $2`, roleID, id, restrictResources, resJSON)
2765 return checkUpdateRow("project invite", res, err)
2766}
2767
2768func (c *connection) FindProjectAccessRequests(ctx context.Context, projectID, afterID string, limit int) ([]*database.ProjectAccessRequest, error) {
2769 var res []*database.ProjectAccessRequest

Callers

nothing calls this directly

Calls 4

getDBMethod · 0.95
marshalResourceNamesFunction · 0.85
checkUpdateRowFunction · 0.85
ExecContextMethod · 0.45

Tested by

no test coverage detected