source

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFieldSchema added in v0.7.0

func BuildFieldSchema(schema bigquery.Schema) []lsp.FieldSchema

BuildFieldSchema converts a BigQuery schema into the client-facing FieldSchema tree, used to render nested RECORD/REPEATED values and table schemas without exposing the BigQuery SDK types to LSP clients.

Types

type File

type File struct {
	RawText string
	Version int
}

type Project

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

func NewProject

func NewProject(ctx context.Context, rootPath string, bqClient bigquery.Client, logger *logrus.Logger) *Project

func NewProjectWithBQClient

func NewProjectWithBQClient(rootPath string, bqClient bigquery.Client, logger *logrus.Logger) *Project

func (*Project) Close

func (p *Project) Close() error

func (*Project) Complete

func (p *Project) Complete(ctx context.Context, uri lsp.DocumentURI, position lsp.Position) ([]completion.CompletionItem, error)

func (*Project) DeleteFile

func (p *Project) DeleteFile(uri lsp.DocumentURI)

func (*Project) Dryrun

func (p *Project) Dryrun(ctx context.Context, uri lsp.DocumentURI) (*bq.JobStatus, error)

func (*Project) GetErrors

func (p *Project) GetErrors(uri lsp.DocumentURI) map[lsp.DocumentURI][]file.Error

func (*Project) GetFile

func (p *Project) GetFile(uri lsp.DocumentURI) (string, bool)

func (*Project) GetJobDetails added in v0.7.0

func (p *Project) GetJobDetails(ctx context.Context, projectID, jobID, location string) ([]lsp.MarkedString, func(context.Context) (*bq.RowIterator, error), error)

GetJobDetails polls until the job is done, then returns its details markdown. The returned closure reads the query result rows lazily, reusing the already-fetched (and already-polled-to-completion) job.

func (*Project) GetJobInfo

func (p *Project) GetJobInfo(ctx context.Context, projectID, jobID, location string) ([]lsp.MarkedString, *bq.RowIterator, error)

func (*Project) GetTableDetails added in v0.7.0

func (p *Project) GetTableDetails(ctx context.Context, projectID, datasetID, tableID string) ([]lsp.MarkedString, []lsp.FieldSchema, func(context.Context) (*bq.RowIterator, error), error)

GetTableDetails fetches table metadata and its details markdown without fetching preview rows. The returned closure fetches the preview rows lazily, reusing the already-fetched metadata instead of calling GetTableMetadata again. GetTableDetails fetches table metadata and its details markdown without fetching preview rows. It also returns the schema as structured FieldSchema data (in addition to the Markdown summary in markedStrings) so callers like the Details webview tab can render a collapsible tree instead of a flat Markdown table. The returned closure fetches the preview rows lazily, reusing the already-fetched metadata instead of calling GetTableMetadata again.

func (*Project) GetTableInfo

func (p *Project) GetTableInfo(ctx context.Context, projectID, datasetID, tableID string) ([]lsp.MarkedString, *bq.RowIterator, error)

func (*Project) LookupIdent

func (p *Project) LookupIdent(ctx context.Context, uri lsp.DocumentURI, position lsp.Position) ([]lsp.Location, error)

func (*Project) ResolveCompletionItem

func (p *Project) ResolveCompletionItem(ctx context.Context, item lsp.CompletionItem) (lsp.CompletionItem, error)

func (*Project) Run

func (*Project) TermDocument

func (p *Project) TermDocument(ctx context.Context, uri lsp.DocumentURI, position lsp.Position) ([]lsp.MarkedString, error)

func (*Project) UpdateFile

func (p *Project) UpdateFile(uri lsp.DocumentURI, text string, version int) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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