Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Daml Script queyFilter use casesForum ↗

Daml Script queyFilter use cases

App Development3 posts329 views3 likesLast activity Oct 2021
LE
Leonid_RozenbergOP
Oct 2021

Thinking of the Daml.Script queryFilter function, I thought that the intent was to provide a mechanism to get a small subset of contracts and avoid loading the non-matching contracts. But, afaiu, the implementation just filters after the entire ACS (of the referred to template) has been fetched. Is that the intent?

CO
cocreature
Oct 2021

queryFilter is just a convenience wrapper. As you noticed it provides no performance benefit. On the gRPC API the ledger doesn’t provide any payload filtering anyway so there is no way we could fetch less data. On the JSON API we do have filtering but fairly limited one. There is no way we could map an arbitrary function a -> Bool to a JSON API filter, the API would need to be a lot more restrictive.

LE
Leonid_Rozenberg
Oct 2021

Thank you.

← Back to Discussions