sqlparser

package
v2.0.2 Latest Latest
Warning

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

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

Documentation

Overview

Simple non-performant recursive descent parser for purposes of sqlcode; currently only supports the special @Enum declarations used by sqlcode. We only allow these on the top, and parsing will stop without any errors at the point hitting anything else.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSqlcodeConstVariable

func IsSqlcodeConstVariable(varname string) bool

func NewDocumentFromExtension

func NewDocumentFromExtension(extension string) sqldocument.Document

Based on the input file extension, create the appropriate Document type

func ParseFilesystems

func ParseFilesystems(fslst []fs.FS, includeTags []string) (filenames []string, result sqldocument.Document, err error)

ParseFileystems iterates through a list of filesystems and parses all supported SQL files and returns the combination of all of them.

err will only return errors related to filesystems/reading. Errors related to parsing/sorting will be in result.Errors.

ParseFilesystems will also sort create statements topologically.

func ParseString

func ParseString(file, input string) sqldocument.Document

Helper function

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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