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

Function EncodeUntaggedBitArrayValue

pkg/util/encoding/encoding.go:1972–1981  ·  view source on GitHub ↗

EncodeUntaggedBitArrayValue encodes a bit array value, appends it to the supplied buffer, and returns the final buffer.

(appendTo []byte, d bitarray.BitArray)

Source from the content-addressed store, hash-verified

1970// EncodeUntaggedBitArrayValue encodes a bit array value, appends it to the
1971// supplied buffer, and returns the final buffer.
1972func EncodeUntaggedBitArrayValue(appendTo []byte, d bitarray.BitArray) []byte {
1973 bitLen := d.BitLen()
1974 words, _ := d.EncodingParts()
1975
1976 appendTo = EncodeNonsortingUvarint(appendTo, uint64(bitLen))
1977 for _, w := range words {
1978 appendTo = EncodeUint64Ascending(appendTo, w)
1979 }
1980 return appendTo
1981}
1982
1983// EncodeUUIDValue encodes a uuid.UUID value with its value tag, appends it to
1984// the supplied buffer, and returns the final buffer.

Callers 1

EncodeBitArrayValueFunction · 0.85

Calls 4

EncodeNonsortingUvarintFunction · 0.85
EncodeUint64AscendingFunction · 0.85
BitLenMethod · 0.80
EncodingPartsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…