Skip to content

pagination to all token-sdk dbs' queries #868

Open
0 of 1 issue completed
Open
Feature
0 of 1 issue completed
@adecaro

Description

@adecaro

This Github Issue asks to introduce pagination support to the token-sdk DBs whose interfaces are defined under token/services/db/driver.

This is needed because when showing results in a web page, we cannot keep the iterator opened for too long to avoid that locks on the db last for too long causing delaying to other operations.
We just need to fetch the information that will be needed for the specific case.

The target DBs are: AuditTransactionDB, TokenDB, and TransactionDB defined under token/services/db/driver..

  • For AuditTransactionDB and TransactionDB, we have the functions: QueryTransactions, QueryMovements, QueryValidations, and QueryTokenRequests.
  • For TokenDB, we have UnspentTokensIterator, UnspentTokensIteratorBy, SpendableTokensIteratorBy, UnsupportedTokensIteratorBy, ListUnspentTokensBy, ListUnspentTokens, ListHistoryIssuedTokens, and QueryTokenDetails.

The implementations can be found under token/services/db/sql. We have the following structure:

  • common contains implementation that use standard SQL.
  • driver defines common interfaces
  • postgres contains the customization for postgres
  • sqlite contains the customization for sqlite

Sub-issues

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions