Documentation
¶
Overview ¶
Package sql routes SQL source files to an explicitly selected dialect.
Index ¶
- type Dialect
- type Router
- func (*Router) Language() string
- func (r *Router) Parse(ctx context.Context, input parserapi.Input) (graph.ParseResult, error)
- func (*Router) SemanticDependencies() []string
- func (*Router) SemanticKey(_ context.Context, input parserapi.Input) (string, error)
- func (r *Router) Supports(filePath string) bool
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 (*Router) SemanticDependencies ¶
func (*Router) SemanticKey ¶
SemanticKey makes repository configuration part of the incremental file hash. Changing grafo.yaml therefore reparses unchanged SQL files that may be routed to a different dialect.
Click to show internal directories.
Click to hide internal directories.