Data Layer low complexity backend
0
Dependencies
1
Dependents
2
Entities
0
Integrations

Description

Data access layer for the caregivers table, providing parameterized query execution to prevent SQL injection. Maps between database rows and domain objects, handles the foreign key relationship to contacts, and supports filtered queries by contact ID. Integrates with the connection pool for efficient database access.

Feature: Caregiver & Next-of-Kin Database

caregiver-repository

Responsibilities

  • Execute parameterized CRUD queries against the caregivers table
  • Map database rows to Caregiver domain objects
  • Filter caregivers by contact foreign key
  • Handle soft-delete or hard-delete based on configuration
  • Ensure referential integrity with contacts table

Interfaces

findByContactId(contactId)
findById(caregiverId)
create(contactId, caregiverData)
update(caregiverId, caregiverData)
delete(caregiverId)
exists(caregiverId)
countByContact(contactId)

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component