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

Function inRange

backend/plugin/parser/pg/restore.go:289–297  ·  view source on GitHub ↗
(start, end, targetStart, targetEnd *storepb.Position)

Source from the content-addressed store, hash-verified

287}
288
289func inRange(start, end, targetStart, targetEnd *storepb.Position) bool {
290 if start.Line < targetStart.Line || (start.Line == targetStart.Line && start.Column < targetStart.Column) {
291 return false
292 }
293 if end.Line > targetEnd.Line || (end.Line == targetEnd.Line && end.Column > targetEnd.Column) {
294 return false
295 }
296 return true
297}
298
299func getPrependStatements(statement string) (string, error) {
300 stmts, err := ParsePg(statement)

Callers 2

findStatementAtPositionFunction · 0.70
extractStatementFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected