/** * SMI-578: SkillRepository - Type-safe CRUD operations for skills * * Provides: * - Create, Read, Update, Delete operations * - Batch insert for 1000+ skills * - Transaction support * - Type-safe queries */ import type { Database as DatabaseType } from '../db/database-interface.js'; import type { Skill, SkillCreateInput, SkillUpdateInput, PaginatedResults } from '../types/skill.js'; /** * Repository for skill CRUD operations */ export declare class SkillRepository { private db; constructor(db: DatabaseType); private stmts; private prepareStatements; /** * Convert a database row to a Skill object */ private rowToSkill; /** * Create a new skill */ create(input: SkillCreateInput): Skill; /** * Create multiple skills in a batch (efficient for 1000+ skills) */ createBatch(inputs: SkillCreateInput[]): Skill[]; /** * Find a skill by ID */ findById(id: string): Skill | null; /** * Find a skill by repository URL */ findByRepoUrl(repoUrl: string): Skill | null; /** * SMI-976: Find all skills with pagination * Accepts either options object or positional parameters for backward compatibility */ findAll(options?: { limit?: number; offset?: number; }): PaginatedResults; findAll(limit?: number, offset?: number): PaginatedResults; /** * Update a skill by ID */ update(id: string, input: SkillUpdateInput): Skill | null; /** * Delete a skill by ID */ delete(id: string): boolean; /** * Delete all skills */ deleteAll(): number; /** * Count all skills */ count(): number; /** * Execute a function within a transaction */ transaction(fn: () => T): T; /** * Check if a skill exists by ID */ exists(id: string): boolean; /** * Upsert a skill (insert or update) */ upsert(input: SkillCreateInput): Skill; } //# sourceMappingURL=SkillRepository.d.ts.map