Documentation
¶
Index ¶
- func NewCatalog() *catalog.Catalog
- func NewIdentifier(t string) *ast.String
- type Parser
- func (p *Parser) Cast(arg, typeName string) string
- func (p *Parser) CommentSyntax() source.CommentSyntax
- func (p *Parser) IsReservedKeyword(s string) bool
- func (p *Parser) NamedParam(name string) string
- func (p *Parser) Param(n int) string
- func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error)
- func (p *Parser) QuoteIdent(s string) string
- func (p *Parser) TypeName(ns, name string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCatalog ¶
func NewIdentifier ¶
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) CommentSyntax ¶
func (p *Parser) CommentSyntax() source.CommentSyntax
func (*Parser) IsReservedKeyword ¶
func (*Parser) NamedParam ¶
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 ¶
Param returns the parameter placeholder for the given number. MySQL uses ? for all parameters (positional).
func (*Parser) QuoteIdent ¶
QuoteIdent returns a quoted identifier if it needs quoting. MySQL uses backticks for quoting identifiers.
Click to show internal directories.
Click to hide internal directories.