MCPcopy Create free account
hub / github.com/actiontech/dtle / ParserRestore

Function ParserRestore

driver/mysql/base/utils.go:728–735  ·  view source on GitHub ↗
(stmt ast.Node)

Source from the content-addressed store, hash-verified

726 return ParserRestore(stmt)
727}
728func ParserRestore(stmt ast.Node) (string, error) {
729 buf := bytes.NewBuffer(nil)
730 err := stmt.Restore(parserformat.NewRestoreCtx(common.ParserRestoreFlag, buf))
731 if err != nil {
732 return "", err
733 }
734 return buf.String(), nil
735}
736
737func BuildCreateTableColsFromMap(cols []*ast.ColumnDef, columnMap []string) (r []*ast.ColumnDef) {
738 if len(columnMap) > 0 {

Callers 2

parseDDLSQLMethod · 0.92
RenameCreateSchemaAddINEFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected