completer

package
v0.2.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CompletionTypeKeyword completionType
	CompletionTypeFunction
	CompletionTypeColumn
	CompletionTypeTable
	CompletionTypeReferencedTable
	CompletionTypeView
	CompletionTypeSubQuery
	CompletionTypeSubQueryColumn
	CompletionTypeChange
	CompletionTypeUser
	CompletionTypeSchema
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Completer

type Completer struct {
	DBCache *database.DBCache
	Driver  dialect.DatabaseDriver
}

func NewCompleter

func NewCompleter(dbCache *database.DBCache) *Completer

func (*Completer) Complete

func (c *Completer) Complete(text string, params lsp.CompletionParams, lowercaseKeywords bool) ([]lsp.CompletionItem, error)

func (*Completer) ReferencedTableCandidates

func (c *Completer) ReferencedTableCandidates(targetTables []*parseutil.TableInfo) []lsp.CompletionItem

func (*Completer) SchemaCandidates

func (c *Completer) SchemaCandidates() []lsp.CompletionItem

func (*Completer) SubQueryCandidates

func (c *Completer) SubQueryCandidates(infos []*parseutil.SubQueryInfo) []lsp.CompletionItem

func (*Completer) SubQueryColumnCandidates

func (c *Completer) SubQueryColumnCandidates(infos []*parseutil.SubQueryInfo) []lsp.CompletionItem

func (*Completer) TableCandidates

func (c *Completer) TableCandidates(parent *completionParent, targetTables []*parseutil.TableInfo) []lsp.CompletionItem

type CompletionContext

type CompletionContext struct {
	// contains filtered or unexported fields
}

type ParentType

type ParentType int
const (
	ParentTypeNone ParentType
	ParentTypeSchema
	ParentTypeTable
	ParentTypeSubQuery
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL