MCPcopy Create free account
hub / github.com/dolthub/doltgresql / scanPlaceholder

Method scanPlaceholder

postgres/parser/parser/scan.go:733–748  ·  view source on GitHub ↗
(lval *sqlSymType)

Source from the content-addressed store, hash-verified

731}
732
733func (s *scanner) scanPlaceholder(lval *sqlSymType) {
734 start := s.pos
735 for lex.IsDigit(s.peek()) {
736 s.pos++
737 }
738 lval.str = s.in[start:s.pos]
739
740 placeholder, err := tree.NewPlaceholder(lval.str)
741 if err != nil {
742 lval.id = ERROR
743 lval.str = err.Error()
744 return
745 }
746 lval.id = PLACEHOLDER
747 lval.union.val = placeholder
748}
749
750// scanHexString scans the content inside x'....'.
751func (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.45

Tested by

no test coverage detected