MCPcopy
hub / github.com/sqlc-dev/sqlc / normalizeErr

Function normalizeErr

internal/engine/postgresql/parse.go:183–196  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

181}
182
183func normalizeErr(err error) error {
184 //TODO: errors.As complains that *parser.Error does not implement error
185 if pErr, ok := err.(*parser.Error); ok {
186 sErr := &sqlerr.Error{
187 Message: pErr.Message,
188 //Err: pErr,
189 Line: pErr.Lineno,
190 Location: pErr.Cursorpos,
191 }
192 return sErr
193 }
194
195 return err
196}
197
198// https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-COMMENTS
199func (p *Parser) CommentSyntax() source.CommentSyntax {

Callers 1

ParseMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected