Documentation
¶
Index ¶
- func CreateTableNameFromTablePathExpressionNode(node *ast.TablePathExpressionNode) (string, bool)
- func ListAstNode[T locationRangeNode](n ast.ScriptNode) []T
- func ListResolvedAstNode[T locationRangeNode](output *zetasql.AnalyzerOutput) []T
- func LookupNode[T astNode](n ast.Node) (T, bool)
- func SearchAstNode[T locationRangeNode](node ast.Node, termOffset int) (T, bool)
- func SearchResolvedAstNode[T locationRangeNode](output *zetasql.AnalyzerOutput, termOffset int) (T, bool)
- type Analyzer
- func (a *Analyzer) AnalyzeStatement(rawText string, stmt ast.StatementNode, catalog types.Catalog) (*zetasql.AnalyzerOutput, error)
- func (a *Analyzer) GetTableMetadataFromPath(ctx context.Context, path string) (*bq.TableMetadata, error)
- func (a *Analyzer) ParseFile(uri lsp.DocumentURI, src string) ParsedFile
- type Catalog
- func (c *Catalog) AddFunctionWithName(name string, fn *types.Function)
- func (c *Catalog) Clone() *Catalog
- func (c *Catalog) ExtendedTypeSuperTypes(typ types.Type) (*types.TypeListView, error)
- func (c *Catalog) FindConnection(path []string) (types.Connection, error)
- func (c *Catalog) FindConstant(path []string) (types.Constant, int, error)
- func (c *Catalog) FindConversion(from, to types.Type) (types.Conversion, error)
- func (c *Catalog) FindFunction(path []string) (*types.Function, error)
- func (c *Catalog) FindModel(path []string) (types.Model, error)
- func (c *Catalog) FindProcedure(path []string) (*types.Procedure, error)
- func (c *Catalog) FindTable(path []string) (types.Table, error)
- func (c *Catalog) FindTableValuedFunction(path []string) (types.TableValuedFunction, error)
- func (c *Catalog) FindType(path []string) (types.Type, error)
- func (c *Catalog) FullName() string
- func (c *Catalog) SuggestConstant(mistypedPath []string) string
- func (c *Catalog) SuggestFunction(mistypedPath []string) string
- func (c *Catalog) SuggestModel(mistypedPath []string) string
- func (c *Catalog) SuggestTable(mistypedPath []string) string
- func (c *Catalog) SuggestTableValuedFunction(mistypedPath []string) string
- type Error
- type FixOffset
- type ParsedFile
- func (p ParsedFile) ExtractSQL(locationRange *types.ParseLocationRange) (string, bool)
- func (p *ParsedFile) FindIncompleteColumnName(pos lsp.Position) string
- func (p *ParsedFile) FindTargetAnalyzeOutput(termOffset int) (*zetasql.AnalyzerOutput, bool)
- func (p ParsedFile) FindTargetStatementNode(termOffset int) (ast.StatementNode, bool)
- func (p ParsedFile) TermOffset(pos lsp.Position) int
- func (p ParsedFile) ToLspRange(r *types.ParseLocationRange) (lsp.Range, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTableNameFromTablePathExpressionNode ¶
func CreateTableNameFromTablePathExpressionNode(node *ast.TablePathExpressionNode) (string, bool)
func ListAstNode ¶
func ListAstNode[T locationRangeNode](n ast.ScriptNode) []T
func ListResolvedAstNode ¶
func ListResolvedAstNode[T locationRangeNode](output *zetasql.AnalyzerOutput) []T
func LookupNode ¶
func SearchAstNode ¶
func SearchResolvedAstNode ¶
func SearchResolvedAstNode[T locationRangeNode](output *zetasql.AnalyzerOutput, termOffset int) (T, bool)
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
func (*Analyzer) AnalyzeStatement ¶
func (a *Analyzer) AnalyzeStatement(rawText string, stmt ast.StatementNode, catalog types.Catalog) (*zetasql.AnalyzerOutput, error)
func (*Analyzer) GetTableMetadataFromPath ¶
func (*Analyzer) ParseFile ¶
func (a *Analyzer) ParseFile(uri lsp.DocumentURI, src string) ParsedFile
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
func NewCatalog ¶
func (*Catalog) AddFunctionWithName ¶
func (*Catalog) ExtendedTypeSuperTypes ¶
func (*Catalog) FindConnection ¶
func (c *Catalog) FindConnection(path []string) (types.Connection, error)
func (*Catalog) FindConstant ¶
func (*Catalog) FindConversion ¶
func (*Catalog) FindFunction ¶
func (*Catalog) FindProcedure ¶
func (*Catalog) FindTableValuedFunction ¶
func (c *Catalog) FindTableValuedFunction(path []string) (types.TableValuedFunction, error)
func (*Catalog) SuggestConstant ¶
func (*Catalog) SuggestFunction ¶
func (*Catalog) SuggestModel ¶
func (*Catalog) SuggestTable ¶
func (*Catalog) SuggestTableValuedFunction ¶
type Error ¶
type ParsedFile ¶
type ParsedFile struct {
URI lsp.DocumentURI
Src string
Node ast.ScriptNode
// index is Node's statement order
RNode []*zetasql.AnalyzerOutput
FixOffsets []FixOffset
Errors []Error
}
func (ParsedFile) ExtractSQL ¶
func (p ParsedFile) ExtractSQL(locationRange *types.ParseLocationRange) (string, bool)
func (*ParsedFile) FindIncompleteColumnName ¶
func (p *ParsedFile) FindIncompleteColumnName(pos lsp.Position) string
func (*ParsedFile) FindTargetAnalyzeOutput ¶
func (p *ParsedFile) FindTargetAnalyzeOutput(termOffset int) (*zetasql.AnalyzerOutput, bool)
func (ParsedFile) FindTargetStatementNode ¶
func (p ParsedFile) FindTargetStatementNode(termOffset int) (ast.StatementNode, bool)
func (ParsedFile) TermOffset ¶
func (p ParsedFile) TermOffset(pos lsp.Position) int
func (ParsedFile) ToLspRange ¶
func (p ParsedFile) ToLspRange(r *types.ParseLocationRange) (lsp.Range, bool)
Click to show internal directories.
Click to hide internal directories.