GetTableSchemaHash implements the interface doltdb.RootValue.
(ctx context.Context, tName doltdb.TableName)
| 468 | |
| 469 | // GetTableSchemaHash implements the interface doltdb.RootValue. |
| 470 | func (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. |
| 483 | func (root *RootValue) HashOf() (hash.Hash, error) { |