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

Method FindOrganizationByName

admin/database/postgres/postgres.go:90–97  ·  view source on GitHub ↗
(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

88}
89
90func (c *connection) FindOrganizationByName(ctx context.Context, name string) (*database.Organization, error) {
91 res := &database.Organization{}
92 err := c.getDB(ctx).QueryRowxContext(ctx, "SELECT * FROM orgs WHERE lower(name)=lower($1)", name).StructScan(res)
93 if err != nil {
94 return nil, parseErr("org", err)
95 }
96 return res, nil
97}
98
99func (c *connection) CountProjectsForOrganization(ctx context.Context, orgID string) (int, error) {
100 var count int

Callers

nothing calls this directly

Calls 2

getDBMethod · 0.95
parseErrFunction · 0.85

Tested by

no test coverage detected