Documentation
¶
Overview ¶
Package sql routes SQL source files to an explicitly selected dialect.
Index ¶
- type Dialect
- type Router
- func (*Router) IsSemanticInput(path string) bool
- func (*Router) Language() string
- func (r *Router) Parse(ctx context.Context, input parserapi.Input) (graph.ParseResult, error)
- func (r *Router) SemanticAffectedPaths(root string, allPaths, changedPaths []string) []string
- func (*Router) SemanticDependencies() []string
- func (r *Router) SemanticKey(ctx context.Context, input parserapi.Input) (string, error)
- func (r *Router) Supports(filePath string) bool
- func (*Router) WorkspaceSemanticEvidenceKey(context.Context, parserapi.Input) (string, error)
- func (r *Router) WorkspaceSemanticKey(ctx context.Context, input parserapi.Input) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialect ¶
type Dialect interface {
Name() string
Extensions() []string
Probe(context.Context, parserapi.Input) error
Parse(context.Context, parserapi.Input) (graph.ParseResult, error)
}
Dialect is the extension point for a SQL grammar and graph extractor. Extensions returns dialect-specific extensions; the router always owns .sql.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is the sole top-level parser for SQL-like files. Dialects are sorted by name so probing and diagnostics never depend on registration order.
func NewWithBindingLoader ¶ added in v0.4.0
func NewWithBindingLoader(loader *sqlcbinding.Loader, dialects ...Dialect) *Router
func (*Router) IsSemanticInput ¶ added in v0.4.0
func (*Router) SemanticAffectedPaths ¶ added in v0.4.0
func (*Router) SemanticDependencies ¶
func (*Router) SemanticKey ¶
func (*Router) WorkspaceSemanticEvidenceKey ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.