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

Method FindProjectsForOrganization

admin/database/postgres/postgres.go:340–351  ·  view source on GitHub ↗
(ctx context.Context, orgID, afterProjectName string, limit int)

Source from the content-addressed store, hash-verified

338}
339
340func (c *connection) FindProjectsForOrganization(ctx context.Context, orgID, afterProjectName string, limit int) ([]*database.Project, error) {
341 var res []*projectDTO
342 err := c.getDB(ctx).SelectContext(ctx, &res, `
343 SELECT p.* FROM projects p
344 WHERE p.org_id=$1 AND lower(p.name) > lower($2)
345 ORDER BY lower(p.name) LIMIT $3
346 `, orgID, afterProjectName, limit)
347 if err != nil {
348 return nil, parseErr("projects", err)
349 }
350 return c.projectsFromDTOs(res)
351}
352
353func (c *connection) FindProjectsForOrgAndUser(ctx context.Context, orgID, userID string, includePublic, includeGroups bool, afterProjectName string, limit int) ([]*database.Project, error) {
354 var qry strings.Builder

Callers

nothing calls this directly

Calls 4

getDBMethod · 0.95
projectsFromDTOsMethod · 0.95
parseErrFunction · 0.85
SelectContextMethod · 0.80

Tested by

no test coverage detected