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

Method UpdateSuperuser

admin/database/postgres/postgres.go:2350–2353  ·  view source on GitHub ↗
(ctx context.Context, userID string, superuser bool)

Source from the content-addressed store, hash-verified

2348}
2349
2350func (c *connection) UpdateSuperuser(ctx context.Context, userID string, superuser bool) error {
2351 res, err := c.getDB(ctx).ExecContext(ctx, `UPDATE users SET superuser=$2, updated_on=now() WHERE id=$1`, userID, superuser)
2352 return checkUpdateRow("superuser", res, err)
2353}
2354
2355func (c *connection) InsertProjectMemberUser(ctx context.Context, projectID, userID, roleID string, restrictResources bool, resources []database.ResourceName) error {
2356 resJSON, err := marshalResourceNames(resources)

Callers

nothing calls this directly

Calls 3

getDBMethod · 0.95
checkUpdateRowFunction · 0.85
ExecContextMethod · 0.45

Tested by

no test coverage detected