skills
| Function Name | Operation Type | Description | Arguments | Returns |
|---|---|---|---|---|
CreateSkill |
Create (Insert) | Inserts a new skill into the skills table. |
ctx context.Context, arg CreateSkillParams { SkillName string, IsVerified bool } |
Skill, error |
CreateManySkills |
Create (Insert) | Inserts multiple skills into the skills table using array unnesting. |
ctx context.Context, arg CreateManySkillsParams { Column1 []string, Column2 []bool } |
[]Skill, error |
UpsertSkill |
Upsert (Insert/Update) | Inserts a new skill or updates it if it already exists based on skill_name. |
ctx context.Context, arg UpsertSkillParams { SkillName string, IsVerified bool } |
Skill, error |
CountSkillsByStatus |
Read (Count) | Returns the total number of skills for a given verification status. | ctx context.Context, isVerified bool |
int64, error |
CountSearchSkillsByStatus |
Read (Count) | NEW: Counts the total number of skills matching a given verification status and partial skill name. | ctx context.Context, arg CountSearchSkillsByStatusParams { IsVerified bool, Lower string } |
int64, error |
GetSkill |
Read (Select) | Retrieves a single skill by its unique ID. | ctx context.Context, id int64 |
Skill, error |
GetSkillByName |
Read (Select) | Retrieves a skill by its name (case-insensitive). | ctx context.Context, lower string |
Skill, error |
ListSkills |
Read (Select) | Retrieves a paginated list of all skills, ordered by ID. | ctx context.Context, arg ListSkillsParams { Limit int32, Offset int32 } |
[]Skill, error |
ListSkillsByNames |
Read (Select) | Retrieves all skills whose names match any in the given list. | ctx context.Context, dollar_1 []string |
[]Skill, error |
ListSkillsByStatus |
Read (Select) | Retrieves a paginated list of skills based on their verification status, ordered by skill name. | ctx context.Context, arg ListSkillsByStatusParams { IsVerified bool, Limit int32, Offset int32 } |
[]Skill, error |
SearchSkillsByStatus |
Read (Select) | Retrieves a paginated list of skills filtered by verification status and partial skill name match (case-insensitive). | ctx context.Context, arg SearchSkillsByStatusParams { IsVerified bool, Lower string, Limit int32, Offset int32 } |
[]Skill, error |
UpdateSkill |
Update | Updates the name of a specific skill. | ctx context.Context, arg UpdateSkillParams { ID int64, SkillName string } |
Skill, error |
UpdateSkillVerification |
Update | Updates the is_verified status of a skill. |
ctx context.Context, arg UpdateSkillVerificationParams { ID int64, IsVerified bool } |
Skill, error |
DeleteSkill |
Delete | Deletes a skill from the database by its ID. | ctx context.Context, id int64 |
error |