BaseLine returns the 0-based line number of the first line of the SQL. This is derived from Start.Line - 1 and is used for advisor code compatibility.
()
| 26 | // BaseLine returns the 0-based line number of the first line of the SQL. |
| 27 | // This is derived from Start.Line - 1 and is used for advisor code compatibility. |
| 28 | func (s *Statement) BaseLine() int { |
| 29 | if s.Start == nil { |
| 30 | return 0 |
| 31 | } |
| 32 | return int(s.Start.Line) - 1 |
| 33 | } |
| 34 | |
| 35 | // NewStatementFromRange builds a Statement from a split segment range. |
| 36 | func NewStatementFromRange(sql string, mapper *ByteOffsetPositionMapper, byteStart, byteEnd int, empty bool) Statement { |
no outgoing calls