MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / scanPlaceholder

Method scanPlaceholder

pkg/sql/parser/scan.go:677–692  ·  view source on GitHub ↗
(lval *sqlSymType)

Source from the content-addressed store, hash-verified

675}
676
677func (s *scanner) scanPlaceholder(lval *sqlSymType) {
678 start := s.pos
679 for lex.IsDigit(s.peek()) {
680 s.pos++
681 }
682 lval.str = s.in[start:s.pos]
683
684 placeholder, err := tree.NewPlaceholder(lval.str)
685 if err != nil {
686 lval.id = ERROR
687 lval.str = err.Error()
688 return
689 }
690 lval.id = PLACEHOLDER
691 lval.union.val = placeholder
692}
693
694// scanHexString scans the content inside x'....'.
695func (s *scanner) scanHexString(lval *sqlSymType, ch int) bool {

Callers 1

scanMethod · 0.95

Calls 4

peekMethod · 0.95
IsDigitFunction · 0.92
NewPlaceholderFunction · 0.92
ErrorMethod · 0.65

Tested by

no test coverage detected