Documentation
¶
Index ¶
- Variables
- func IsNamedParamFunc(node *nodes.Node) bool
- func IsNamedParamSign(node *nodes.Node) bool
- func NewCatalog() *catalog.Catalog
- 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 ¶
View Source
var Fingerprint = nodes.Fingerprint
View Source
var Parse = nodes.Parse
Functions ¶
func IsNamedParamFunc ¶
func IsNamedParamSign ¶
func NewCatalog ¶
Types ¶
type Parser ¶
type Parser struct {
}
func (*Parser) CommentSyntax ¶
func (p *Parser) CommentSyntax() source.CommentSyntax
https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-COMMENTS
func (*Parser) IsReservedKeyword ¶
https://www.postgresql.org/docs/current/sql-keywords-appendix.html
func (*Parser) NamedParam ¶
NamedParam returns the named parameter placeholder for the given name. PostgreSQL/sqlc uses @name syntax.
func (*Parser) Param ¶
Param returns the parameter placeholder for the given number. PostgreSQL uses $1, $2, etc.
func (*Parser) QuoteIdent ¶
QuoteIdent returns a quoted identifier if it needs quoting. This implements the format.Dialect interface.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.