Documentation
¶
Index ¶
- func CollectionArgs(values any, expiryEpoch uint64) []any
- func VotingPowerBatchSQL(dialectName string, expiryEpoch uint64) string
- func VotingPowerByTypeSQL(dialectName string, expiryEpoch uint64) string
- func VotingPowerSQL(dialectName string, credentialTag uint8, drepCredential []byte, ...) (string, []any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectionArgs ¶
CollectionArgs returns the bind order shared by batch and by-type queries: inner expiry, inner collection, outer expiry, outer collection.
func VotingPowerBatchSQL ¶
VotingPowerBatchSQL builds the aggregate credential voting-power query.
func VotingPowerByTypeSQL ¶
VotingPowerByTypeSQL builds the predefined-DRep voting-power query. The inner subquery starts from the small, indexed set of accounts delegated to the requested drep_type(s) and joins outward to utxo (the account-first shape VotingPowerBatchSQL already uses), instead of scanning every live utxo row and probing account with a correlated EXISTS per row. See blinklabs-io/dingo#4364: on a live preview node with 2.86M live utxo rows and ~4,610 drep-delegated accounts, the correlated-EXISTS shape cost 620-650ms per call versus 16-35ms for this shape, with byte-identical results.
Types ¶
This section is empty.