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

Function dmlTailStart

backend/plugin/parser/tsql/backup.go:353–363  ·  view source on GitHub ↗
(source string, searchStart int, _ ast.Loc, where ast.ExprNode, option *ast.List)

Source from the content-addressed store, hash-verified

351}
352
353func dmlTailStart(source string, searchStart int, _ ast.Loc, where ast.ExprNode, option *ast.List) int {
354 if where != nil {
355 if start := findKeywordBefore(source, "WHERE", dmlNodeLoc(where).Start, searchStart); start >= 0 {
356 return start
357 }
358 }
359 if option != nil {
360 return findKeywordAfter(source, "OPTION", searchStart, len(source))
361 }
362 return -1
363}
364
365func trimDMLStatementEnd(source string, end int) int {
366 if end > len(source) {

Callers 2

dmlFromSourceFunction · 0.85
dmlTrailingClauseFunction · 0.85

Calls 3

findKeywordBeforeFunction · 0.85
dmlNodeLocFunction · 0.85
findKeywordAfterFunction · 0.85

Tested by

no test coverage detected