Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search for Data Contract Documents partially not working #2409

Open
owl352 opened this issue Dec 29, 2024 · 0 comments
Open

Search for Data Contract Documents partially not working #2409

owl352 opened this issue Dec 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@owl352
Copy link
Contributor

owl352 commented Dec 29, 2024

When trying to retrieve documents for contract date withdrawals with where, I get an empty array

Expected Behavior

If I specify ['transactionIndex', '==', 2] or ['transactionIndex', '>=', 2] or ['transactionIndex', '>', 2], then I should get an array with documents whose index matches the condition in the response

Current Behavior

At any specified value for transactionIndex, I get an empty array in response. Also, if you specify another condition for status as a range, the search will also return an empty array. However, if at least one condition requires a strict comparison, everything will work

Possible Solution

Steps to Reproduce (for bugs)

  1. use this json for data contract object
  2. Here you get empty response
const query = {
  where: [
    ['transactionIndex', 'in', [0,1,2,3,4,5]],
    ['status', '>', 0]
  ],
  orderBy: [
    ['status', order],
    ['transactionIndex', order],
  ]
}

const { documents } = await this.dapi.platform.getDocuments(Identifier.from(dataContractObject.id), type, query) 
  1. Here you get some documents
const query = {
  where: [
    ['transactionIndex', 'in', [0,1,2,3,4,5]],
    ['status', '=', 3]
  ],
  orderBy: [
    ['status', order],
    ['transactionIndex', order],
  ]
}

const { documents } = await this.dapi.platform.getDocuments(Identifier.from(dataContractObject.id), type, query) 

Context

Your Environment

  • 'dashpay/drive:1.7'
  • 'dashpay/dapi:1.7.1'
  • node: v20.16.0
  • dapi-client: from fork which made already after the latest updates of the getDocuments method
@owl352 owl352 added the bug Something isn't working label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant