Comprehensive data access layer for progress tracking operations using Prisma ORM.
This repository provides a complete abstraction over the database layer for all progress-related
data operations in the WayrApp language learning platform. It handles user progress tracking,
lesson completion records, and analytics data with robust error handling and transaction support.
The repository implements the Repository pattern, providing a clean interface between the business
logic layer and the database. It includes comprehensive Prisma error handling, automatic data
mapping between database models and application interfaces, and optimized queries for performance.
Key features include atomic transaction support for batch operations, intelligent error mapping
from Prisma errors to application-specific errors, pagination support for large datasets,
aggregation queries for analytics, and comprehensive CRUD operations for both user progress
and lesson completion entities.
The repository ensures data consistency through proper constraint handling, provides efficient
upsert operations for progress updates, and includes specialized methods for offline synchronization
scenarios with duplicate detection and conflict resolution.
Author
Exequiel Trujillo
Since
1.0.0
Example
// Initialize repository with Prisma client constprogressRepository = newProgressRepository(prisma);
Comprehensive data access layer for progress tracking operations using Prisma ORM.
This repository provides a complete abstraction over the database layer for all progress-related data operations in the WayrApp language learning platform. It handles user progress tracking, lesson completion records, and analytics data with robust error handling and transaction support.
The repository implements the Repository pattern, providing a clean interface between the business logic layer and the database. It includes comprehensive Prisma error handling, automatic data mapping between database models and application interfaces, and optimized queries for performance.
Key features include atomic transaction support for batch operations, intelligent error mapping from Prisma errors to application-specific errors, pagination support for large datasets, aggregation queries for analytics, and comprehensive CRUD operations for both user progress and lesson completion entities.
The repository ensures data consistency through proper constraint handling, provides efficient upsert operations for progress updates, and includes specialized methods for offline synchronization scenarios with duplicate detection and conflict resolution.
Author
Exequiel Trujillo
Since
1.0.0
Example