MCPcopy Create free account
hub / github.com/bytebase/bytebase / restoreNode

Function restoreNode

backend/plugin/schema/tidb/walk_through.go:1390–1397  ·  view source on GitHub ↗
(node tidbast.Node, flag format.RestoreFlags)

Source from the content-addressed store, hash-verified

1388}
1389
1390func restoreNode(node tidbast.Node, flag format.RestoreFlags) (string, error) {
1391 var buffer strings.Builder
1392 ctx := format.NewRestoreCtx(flag, &buffer)
1393 if err := node.Restore(ctx); err != nil {
1394 return "", errors.Wrapf(err, "failed to deparse node")
1395 }
1396 return buffer.String(), nil
1397}
1398
1399func getIndexType(option *tidbast.IndexOption) string {
1400 if option != nil {

Callers 3

tidbChangeColumnDefaultFunction · 0.85
tidbCreateColumnHelperFunction · 0.85

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected