projects

Function Name Operation Type Description Arguments Returns
CountActiveProjectsByTeam Read (Select) Returns the count of active (non-archived) projects for a specific team. ctx context.Context, teamID int64 int64, error
CountArchivedProjectsByTeam Read (Select) Returns the count of archived projects for a specific team. ctx context.Context, teamID int64 int64, error
CountProjectsByTeam Read (Select) Returns the count of active projects for a specific team (excludes archived). ctx context.Context, teamID int64 int64, error
CreateProject Create (Insert) Inserts a new project into the projects table. ctx context.Context, arg CreateProjectParams { ProjectName string, TeamID int64, Description pgtype.Text } Project, error
ArchiveProject Update Archives a single active project by ID and team, setting archived=true and archived_at=now(). ctx context.Context, arg ArchiveProjectParams { ID int64, TeamID int64 } Project, error
UnarchiveProject Update Unarchives a single archived project by ID and team, setting archived=false and archived_at=NULL. ctx context.Context, arg UnarchiveProjectParams { ID int64, TeamID int64 } Project, error
DeleteProject Delete ⚠️ Not recommended - Deletes a project by its ID (archive instead). ctx context.Context, id int64 error
GetProject Read (Select) Retrieves a single project by its ID (includes archived status). ctx context.Context, id int64 Project, error
GetProjectByIDAndTeam Read (Select) Retrieves a project by ID, only if it belongs to the specified team (includes archived status). ctx context.Context, arg GetProjectByIDAndTeamParams { ID int64, TeamID int64 } Project, error
ListProjects Read (Select) Retrieves a paginated list of all projects (active and archived) ordered by ID. ctx context.Context, arg ListProjectsParams { Limit int32, Offset int32 } []Project, error
ListActiveProjectsByTeam Read (Select) Retrieves paginated list of active (non-archived) projects for a specific team. ctx context.Context, arg ListActiveProjectsByTeamParams { TeamID int64, Limit int32, Offset int32 } []Project, error
ListArchivedProjectsByTeam Read (Select) Retrieves paginated list of archived projects for a specific team, sorted by archive date. ctx context.Context, arg ListArchivedProjectsByTeamParams { TeamID int64, Limit int32, Offset int32 } []Project, error
ListProjectsByTeam Read (Select) Retrieves paginated list of active projects for a specific team (excludes archived). ctx context.Context, arg ListProjectsByTeamParams { TeamID int64, Limit int32, Offset int32 } []Project, error
UpdateProject Update Updates a project's name and description (cannot update archived projects). ctx context.Context, arg UpdateProjectParams { ID int64, TeamID int64, ProjectName string, Description pgtype.Text } Project, error