MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / Init

Method Init

pkg/sql/scanner/scan.go:88–95  ·  view source on GitHub ↗

Init initializes a new Scanner that will process str.

(str string)

Source from the content-addressed store, hash-verified

86
87// Init initializes a new Scanner that will process str.
88func (s *Scanner) Init(str string) {
89 *s = Scanner{
90 in: str,
91 pos: 0,
92 // Preallocate some buffer space for identifiers etc.
93 bytesPrealloc: make([]byte, len(str)),
94 }
95}
96
97// RetainComments instructs the scanner to collect SQL comments in the Comments
98// field.

Callers 7

makeSQLScannerFunction · 0.45
parseWithDepthMethod · 0.45
HasMultipleStatementsFunction · 0.45
LastLexicalTokenFunction · 0.45
FirstLexicalTokenFunction · 0.45
InspectFunction · 0.45
parseWithDepthMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected