Skip to content

Add DB indexes, cursor pagination, tests, and FTS migration (#880, #879, #882, #881) - #983

Open
Maryermarh wants to merge 1 commit into
MettaChain:mainfrom
Maryermarh:feat/db-indexes-cursor-pagination-tests-fts
Open

Add DB indexes, cursor pagination, tests, and FTS migration (#880, #879, #882, #881)#983
Maryermarh wants to merge 1 commit into
MettaChain:mainfrom
Maryermarh:feat/db-indexes-cursor-pagination-tests-fts

Conversation

@Maryermarh

@Maryermarh Maryermarh commented Jul 26, 2026

Copy link
Copy Markdown

Changes

Add database indexes for common query patterns (Closes #880)

  • Composite index for Transaction(buyerId, sellerId)
  • Composite index for Dispute(status, transactionId)
  • Composite index for PropertyView(propertyId, userId, viewedAt)

Implement cursor-based pagination (Closes #879)

  • Add cursor support to search, admin, and transactions services
  • Backward compatible with existing page-based pagination
  • Return nextCursor/previousCursor in responses

Add unit tests for services (Closes #882)

  • Enhanced transactions.service.spec.ts with comprehensive test coverage
  • Tests for findAll, findOne, create, update, updateTransactionStatus, recordOnBlockchain, verifyOnBlockchain, getAnalytics

Add database migration for full-text search indexes (Closes #881)

  • tsvector column for searchable fields
  • GIN index for full-text search
  • Auto-update trigger for search vector

- Add database indexes for common query patterns (MettaChain#880): Composite indexes for Transaction(buyerId,sellerId), Dispute(status,transactionId), PropertyView(propertyId,userId,viewedAt)
- Implement cursor-based pagination (MettaChain#879): Add cursor support to search, admin, and transactions services
- Add unit tests for services (MettaChain#882): Enhanced transactions.service.spec.ts with comprehensive test coverage
- Add full-text search migration (MettaChain#881): tsvector column, GIN index, auto-update trigger for properties
@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@Maryermarh Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant