dolphin

package
v0.0.0-...-d9b39ff Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCatalog

func NewCatalog() *catalog.Catalog

func NewIdentifier

func NewIdentifier(t string) *ast.String

Types

type Parser

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

func NewParser

func NewParser() *Parser

func (*Parser) Cast

func (p *Parser) Cast(arg, typeName string) string

Cast returns a type cast expression. MySQL uses CAST(expr AS type) syntax.

func (*Parser) NamedParam

func (p *Parser) NamedParam(name string) string

NamedParam returns the named parameter placeholder for the given name. MySQL doesn't have native named parameters, so we use ? (positional). The actual parameter names are handled by sqlc's rewrite phase.

func (*Parser) Param

func (p *Parser) Param(n int) string

Param returns the parameter placeholder for the given number. MySQL uses ? for all parameters (positional).

func (*Parser) Parse

func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error)

func (*Parser) QuoteIdent

func (p *Parser) QuoteIdent(s string) string

QuoteIdent returns a quoted identifier if it needs quoting. MySQL uses backticks for quoting identifiers.

func (*Parser) TypeName

func (p *Parser) TypeName(ns, name string) string

TypeName returns the SQL type name for the given namespace and name. Handles MySQL-specific type name mappings for formatting.

Jump to

Keyboard shortcuts

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