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{}
func (*Parser) Cast ¶
Cast returns a type cast expression. ClickHouse uses CAST(expr AS type) syntax, same as MySQL.
func (*Parser) CommentSyntax ¶
func (p *Parser) CommentSyntax() source.CommentSyntax
https://clickhouse.com/docs/en/sql-reference/syntax#comments
func (*Parser) NamedParam ¶
NamedParam returns the named parameter placeholder for the given name. ClickHouse uses {name:Type} syntax for named parameters.
func (*Parser) Param ¶
Param returns the parameter placeholder for the given number. ClickHouse uses {name:Type} for named parameters, but for positional parameters we use ? which is supported by the clickhouse-go driver.
func (*Parser) QuoteIdent ¶
QuoteIdent returns a quoted identifier if it needs quoting. ClickHouse uses backticks or double quotes for quoting identifiers.
Click to show internal directories.
Click to hide internal directories.