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

Method GetTableSchemaHash

core/rootvalue.go:470–480  ·  view source on GitHub ↗

GetTableSchemaHash implements the interface doltdb.RootValue.

(ctx context.Context, tName doltdb.TableName)

Source from the content-addressed store, hash-verified

468
469// GetTableSchemaHash implements the interface doltdb.RootValue.
470func (root *RootValue) GetTableSchemaHash(ctx context.Context, tName doltdb.TableName) (hash.Hash, error) {
471 // TODO: look into faster ways to get the table schema hash without having to deserialize the table first
472 tab, ok, err := root.GetTable(ctx, tName)
473 if err != nil {
474 return hash.Hash{}, err
475 }
476 if !ok {
477 return hash.Hash{}, nil
478 }
479 return tab.GetSchemaHash(ctx)
480}
481
482// HashOf implements the interface doltdb.RootValue.
483func (root *RootValue) HashOf() (hash.Hash, error) {

Callers

nothing calls this directly

Calls 1

GetTableMethod · 0.95

Tested by

no test coverage detected