MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / UnsafeBytes

Method UnsafeBytes

pkg/sql/sem/tree/datum.go:1713–1715  ·  view source on GitHub ↗

UnsafeBytes returns the raw bytes avoiding allocation. It is "unsafe" because the contract is that callers must not to mutate the bytes but there is nothing stopping that from happening.

()

Source from the content-addressed store, hash-verified

1711// the contract is that callers must not to mutate the bytes but there is
1712// nothing stopping that from happening.
1713func (d *DEncodedKey) UnsafeBytes() []byte {
1714 return encoding.UnsafeConvertStringToBytes(string(*d))
1715}
1716
1717// DUuid is the UUID Datum.
1718type DUuid struct {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected