parser

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package parser implements a DDL parser for SQLite schemas.

Index

Constants

View Source
const (
	SeverityError   = diagnostic.SeverityError
	SeverityWarning = diagnostic.SeverityWarning
)

Severity constants for backward compatibility.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic = diagnostic.Diagnostic

Diagnostic is an alias for backward compatibility.

func Parse

func Parse(path string, tokens []tokenizer.Token) (*model.Catalog, []Diagnostic, error)

Parse constructs a catalog from the provided tokens, collecting diagnostics.

type Parser

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

Parser consumes tokenizer output and produces a normalized catalog.

type SchemaParser

type SchemaParser = diagnostic.SchemaParser

SchemaParser is an alias for backward compatibility.

func NewSchemaParser

func NewSchemaParser(dialect string) (SchemaParser, error)

NewSchemaParser creates a new SchemaParser for the specified dialect. Currently only "sqlite" is supported. For PostgreSQL, use the postgres package directly.

type Severity

type Severity = diagnostic.Severity

Severity is an alias for backward compatibility.

Directories

Path Synopsis
Package mysql provides SQL keyword constants for the MySQL parser.
Package mysql provides SQL keyword constants for the MySQL parser.
Package postgres provides SQL keyword constants for the PostgreSQL parser.
Package postgres provides SQL keyword constants for the PostgreSQL parser.

Jump to

Keyboard shortcuts

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