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

Method CountProjectsForOrganization

admin/database/postgres/postgres.go:99–106  ·  view source on GitHub ↗
(ctx context.Context, orgID string)

Source from the content-addressed store, hash-verified

97}
98
99func (c *connection) CountProjectsForOrganization(ctx context.Context, orgID string) (int, error) {
100 var count int
101 err := c.getDB(ctx).QueryRowxContext(ctx, "SELECT COUNT(*) FROM projects WHERE org_id=$1", orgID).Scan(&count)
102 if err != nil {
103 return 0, parseErr("projects", err)
104 }
105 return count, nil
106}
107
108func (c *connection) FindOrganizationByCustomDomain(ctx context.Context, domain string) (*database.Organization, error) {
109 res := &database.Organization{}

Callers

nothing calls this directly

Calls 3

getDBMethod · 0.95
parseErrFunction · 0.85
ScanMethod · 0.65

Tested by

no test coverage detected