MCPcopy Create free account
hub / github.com/bytebase/bytebase / isNoSeparatorRequired

Function isNoSeparatorRequired

backend/plugin/parser/pg/completion.go:82–93  ·  view source on GitHub ↗

isNoSeparatorRequired returns true if tokenType is a punctuation/operator token that does not require whitespace separation from the next token.

(tokenType int)

Source from the content-addressed store, hash-verified

80// isNoSeparatorRequired returns true if tokenType is a punctuation/operator token
81// that does not require whitespace separation from the next token.
82func isNoSeparatorRequired(tokenType int) bool {
83 switch tokenType {
84 case '$', '(', ')', '[', ']', ',', ';', ':', '=', '.',
85 '+', '-', '/', '^', '<', '>', '%', '*',
86 pgparser.TYPECAST, pgparser.DOT_DOT, pgparser.COLON_EQUALS,
87 pgparser.EQUALS_GREATER, pgparser.LESS_EQUALS,
88 pgparser.GREATER_EQUALS, pgparser.NOT_EQUALS, pgparser.PARAM,
89 pgparser.Op:
90 return true
91 }
92 return false
93}
94
95type Completer struct {
96 ctx context.Context

Callers 1

completionMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected