Versions in this module Expand all Collapse all v2 v2.0.4 Jan 11, 2026 v2.0.3 Jan 11, 2026 Changes in this version + var CreateTypeMapping = map[string]CreateType + var CycleError = errors.New("Detected a dependency cycle") + func CopyToken(s Scanner, target *[]Unparsed) + func NextTokenCopyingWhitespace(s Scanner, target *[]Unparsed) + func RecoverToNextStatement(s Scanner, StatementTokens []string) + func RecoverToNextStatementCopying(s Scanner, target *[]Unparsed, StatementTokens []string) + func TopologicalSort(input []Create) (output []Create, errpos Pos, err error) + type Batch struct + BatchSeparatorHandler func(Scanner, *Batch) + DocString []PosString + Errors []Error + Nodes []Unparsed + TokenCalls map[string]int + TokenHandlers map[string]func(Scanner, *Batch) int + func NewBatch() *Batch + func (n *Batch) Create(s Scanner) + func (n *Batch) HasErrors() bool + func (n *Batch) Parse(s Scanner) bool + type Create struct + Body []Unparsed + CreateType CreateType + DependsOn []PosString + Docstring []PosString + Driver driver.Driver + QuotedName PosString + func (c Create) DependsOnStrings() (result []string) + func (c Create) DocstringAsString() string + func (c Create) DocstringYamldoc() (string, error) + func (c Create) ParseYamlInDocstring(out any) error + func (c Create) Serialize(w io.StringWriter) error + func (c Create) SerializeBytes(w io.Writer) error + func (c Create) String() string + type CreateType int + const SQLFunction + const SQLProcedure + const SQLType + type Declare struct + Datatype Type + Literal Unparsed + Start Pos + Stop Pos + VariableName string + func (d Declare) String() string + type Document interface + Creates func() []Create + Declares func() []Declare + Empty func() bool + Errors func() []Error + HasErrors func() bool + Include func(other Document) + Parse func(input []byte, file FileRef) error + PragmaIncludeIf func() []string + Sort func() + type Error struct + Message string + Pos Pos + func (e Error) Error() string + func (e Error) WithoutPos() Error + type FileRef string + type NotFoundError struct + Name string + func (n NotFoundError) Error() string + type Pos struct + Col int + File FileRef + Line int + type PosString struct + Value string + func ParseCodeschemaName(s Scanner, target *[]Unparsed, statementTokens []string) (PosString, error) + func (p PosString) String() string + type Pragma struct + func (d *Pragma) ParsePragmas(s Scanner) error + func (d Pragma) PragmaIncludeIf() []string + type Scanner interface + File func() FileRef + NextNonWhitespaceCommentToken func() TokenType + NextNonWhitespaceToken func() TokenType + NextToken func() TokenType + ReservedWord func() string + SetFile func(FileRef) + SetInput func([]byte) + SkipWhitespace func() + SkipWhitespaceComments func() + Start func() Pos + Stop func() Pos + Token func() string + TokenLower func() string + TokenType func() TokenType + type TokenType int + const BatchSeparatorToken + const CommaToken + const CommonTokenStart + const DotToken + const EOFToken + const EqualToken + const IdentifierToken + const LeftParenToken + const MalformedBatchSeparatorToken + const MultilineCommentToken + const NonUTF8ErrorToken + const NumberToken + const OtherToken + const PGSQLTokenStart + const PragmaToken + const QuotedIdentifierToken + const ReservedWordToken + const RightParenToken + const SemicolonToken + const SinglelineCommentToken + const StringLiteralToken + const TSQLTokenStart + const UnquotedIdentifierToken + const UnterminatedIdentifierErrorToken + const UnterminatedStringErrorToken + const VariableIdentifierToken + const WhitespaceToken + type Type struct + Args []string + BaseType string + func (t Type) String() (result string) + type Unparsed struct + RawValue string + Start Pos + Stop Pos + Type TokenType + func CreateUnparsed(s Scanner) Unparsed