(ctx context.Context, orgID string)
| 97 | } |
| 98 | |
| 99 | func (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 | |
| 108 | func (c *connection) FindOrganizationByCustomDomain(ctx context.Context, domain string) (*database.Organization, error) { |
| 109 | res := &database.Organization{} |