MCPcopy Index your code
hub / github.com/bytebase/bytebase / convertCandidateType

Function convertCandidateType

backend/plugin/parser/redshift/completion.go:287–312  ·  view source on GitHub ↗
(t redshiftcompletion.CandidateType)

Source from the content-addressed store, hash-verified

285}
286
287func convertCandidateType(t redshiftcompletion.CandidateType) base.CandidateType {
288 switch t {
289 case redshiftcompletion.CandidateKeyword:
290 return base.CandidateTypeKeyword
291 case redshiftcompletion.CandidateSchema:
292 return base.CandidateTypeSchema
293 case redshiftcompletion.CandidateTable:
294 return base.CandidateTypeTable
295 case redshiftcompletion.CandidateView:
296 return base.CandidateTypeView
297 case redshiftcompletion.CandidateMaterializedView:
298 return base.CandidateTypeMaterializedView
299 case redshiftcompletion.CandidateColumn:
300 return base.CandidateTypeColumn
301 case redshiftcompletion.CandidateFunction:
302 return base.CandidateTypeFunction
303 case redshiftcompletion.CandidateSequence:
304 return base.CandidateTypeSequence
305 case redshiftcompletion.CandidateIndex:
306 return base.CandidateTypeIndex
307 case redshiftcompletion.CandidateTrigger:
308 return base.CandidateTypeTrigger
309 default:
310 return base.CandidateTypeNone
311 }
312}
313
314// caretToByteOffset converts a (1-based line, 0-based column) caret position
315// into a byte offset into statement. The column is interpreted as a UTF-16

Callers 1

CompletionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected