MCPcopy Create free account
hub / github.com/dolthub/doltgresql / decodeTableNameForAddressMap

Function decodeTableNameForAddressMap

core/storage/storage.go:319–328  ·  view source on GitHub ↗

decodeTableNameForAddressMap decodes a previously-encoded table name from storage.

(encodedName, schemaName string)

Source from the content-addressed store, hash-verified

317
318// decodeTableNameForAddressMap decodes a previously-encoded table name from storage.
319func decodeTableNameForAddressMap(encodedName, schemaName string) (string, bool) {
320 if schemaName == "" && encodedName[0] != 0 {
321 return encodedName, true
322 } else if schemaName != "" && encodedName[0] == 0 &&
323 len(encodedName) > len(schemaName)+2 &&
324 encodedName[1:len(schemaName)+1] == schemaName {
325 return encodedName[len(schemaName)+2:], true
326 }
327 return "", false
328}
329
330// RootTableMap is an address map alongside a schema name.
331type RootTableMap struct {

Callers 1

IterMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected