NewByteOffsetPositionMapper creates a mapper for byte offsets in sql.
(sql string)
| 17 | |
| 18 | // NewByteOffsetPositionMapper creates a mapper for byte offsets in sql. |
| 19 | func NewByteOffsetPositionMapper(sql string) *ByteOffsetPositionMapper { |
| 20 | return &ByteOffsetPositionMapper{ |
| 21 | sql: sql, |
| 22 | line: 1, |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | // Position returns the 1-based line:column position for byteOffset. |
| 27 | func (m *ByteOffsetPositionMapper) Position(byteOffset int) *storepb.Position { |
no outgoing calls