MCPcopy Index your code
hub / github.com/rilldata/rill / FindMagicAuthTokenWithUser

Method FindMagicAuthTokenWithUser

admin/database/postgres/postgres.go:1629–1636  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

1627}
1628
1629func (c *connection) FindMagicAuthTokenWithUser(ctx context.Context, id string) (*database.MagicAuthTokenWithUser, error) {
1630 res := &magicAuthTokenWithUserDTO{}
1631 err := c.getDB(ctx).QueryRowxContext(ctx, "SELECT t.*, COALESCE(u.email, '') AS created_by_user_email FROM magic_auth_tokens t LEFT JOIN users u ON t.created_by_user_id=u.id WHERE t.id=$1 AND t.internal=false", id).StructScan(res)
1632 if err != nil {
1633 return nil, parseErr("magic auth token", err)
1634 }
1635 return c.magicAuthTokenWithUserFromDTO(res)
1636}
1637
1638func (c *connection) InsertMagicAuthToken(ctx context.Context, opts *database.InsertMagicAuthTokenOptions) (*database.MagicAuthToken, error) {
1639 if err := database.Validate(opts); err != nil {

Callers

nothing calls this directly

Calls 3

getDBMethod · 0.95
parseErrFunction · 0.85

Tested by

no test coverage detected