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

Function extractStatementText

backend/plugin/parser/tidb/backup.go:480–487  ·  view source on GitHub ↗
(fullSQL string, loc ast.Loc)

Source from the content-addressed store, hash-verified

478}
479
480func extractStatementText(fullSQL string, loc ast.Loc) string {
481 start := max(0, loc.Start)
482 end := loc.End
483 if end <= start || end > len(fullSQL) {
484 end = len(fullSQL)
485 }
486 return strings.TrimSpace(fullSQL[start:end])
487}
488
489func generateSQL(ctx context.Context, tCtx base.TransformContext, statementInfoList []statementInfo, databaseName string, tablePrefix string) ([]base.BackupStatement, error) {
490 if len(statementInfoList) <= maxMixedDMLCount {

Callers 2

extractTablesFromDeleteFunction · 0.70
extractTablesFromUpdateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected