MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / FromEncodingParts

Function FromEncodingParts

pkg/util/bitarray/bitarray.go:491–501  ·  view source on GitHub ↗

FromEncodingParts creates a bit array from the encoding parts.

(words []uint64, lastBitsUsed uint64)

Source from the content-addressed store, hash-verified

489
490// FromEncodingParts creates a bit array from the encoding parts.
491func FromEncodingParts(words []uint64, lastBitsUsed uint64) (BitArray, error) {
492 if lastBitsUsed > numBitsPerWord {
493 err := fmt.Errorf("FromEncodingParts: lastBitsUsed must not exceed %d, got %d",
494 errors.Safe(numBitsPerWord), errors.Safe(lastBitsUsed))
495 return BitArray{}, pgerror.WithCandidateCode(err, pgcode.InvalidParameterValue)
496 }
497 return BitArray{
498 words: words,
499 lastBitsUsed: uint8(lastBitsUsed),
500 }, nil
501}
502
503// mustFromEncodingParts is like FromEncodingParts but errors cause a panic.
504func mustFromEncodingParts(words []uint64, lastBitsUsed uint64) BitArray {

Callers 5

DecodeBitArrayAscendingFunction · 0.92
DecodeBitArrayDescendingFunction · 0.92
ParseFunction · 0.85
mustFromEncodingPartsFunction · 0.85

Calls 1

WithCandidateCodeFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…