Skip to content

feat: refactor certificate repository for DynamoDB single-table - #9

Open
maxsonferovante wants to merge 2 commits into
masterfrom
feature/single-table-dynamodb
Open

feat: refactor certificate repository for DynamoDB single-table#9
maxsonferovante wants to merge 2 commits into
masterfrom
feature/single-table-dynamodb

Conversation

@maxsonferovante

Copy link
Copy Markdown
Contributor

Summary

Refactors CertificateRepository for DynamoDB single-table design pattern.

Changes

  • dynamodb_keys.py: Add PK/SK/GSI key generation helpers
  • CertificateRepository: Updated for single-table pattern with GSIs:
    • GSI1: Certificate by UUID
    • GSI2: Certificates by email
    • GSI3: Certificates by product
    • GSI4: Successful certificates
  • EntityType filter: Added to GSI queries
  • config.py: Returns single table name

Related

Part of the single-table migration. Infrastructure PR: PythonFloripa/py-certify-infra

- Add dynamodb_keys.py with PK/SK/GSI key generation helpers
- Refactor CertificateRepository for single-table pattern:
  - Uses GSI1 (UUID), GSI2 (email), GSI3 (product), GSI4 (success)
- Add EntityType filter to GSI queries
- Update config to return single table name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant