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

Function statementPositions

backend/plugin/parser/tsql/restore.go:423–425  ·  view source on GitHub ↗
(start *storepb.Position, source string, loc ast.Loc)

Source from the content-addressed store, hash-verified

421}
422
423func statementPositions(start *storepb.Position, source string, loc ast.Loc) (*storepb.Position, *storepb.Position) {
424 return positionFromByteOffset(start, source, loc.Start), positionFromByteOffset(start, source, dmlEndOffset(source, loc))
425}
426
427// inRange checks if a statement's position range is within the target range.
428func inRange(start, end, targetStart, targetEnd *storepb.Position) bool {

Callers 2

GenerateRestoreSQLFunction · 0.85
extractStatementFunction · 0.85

Calls 2

positionFromByteOffsetFunction · 0.85
dmlEndOffsetFunction · 0.85

Tested by

no test coverage detected