MCPcopy Create free account
hub / github.com/PostHog/duckgres / encodeBytea

Function encodeBytea

server/types.go:516–525  ·  view source on GitHub ↗
(v interface{})

Source from the content-addressed store, hash-verified

514}
515
516func encodeBytea(v interface{}) []byte {
517 switch val := v.(type) {
518 case []byte:
519 return val
520 case string:
521 return []byte(val)
522 default:
523 return nil
524 }
525}
526
527// encodeUUID encodes a UUID value as 16 raw bytes (PostgreSQL binary UUID format).
528// DuckDB Go driver returns UUID as []byte (16 bytes).

Callers 2

TestEncodeByteaFunction · 0.85
encodeBinaryFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestEncodeByteaFunction · 0.68