clickhouse

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dialect

func Dialect() core.Option

Dialect returns the catalog option that seeds ClickHouse's type system.

func NewCatalog

func NewCatalog() *catalog.Catalog

func NewIdentifier

func NewIdentifier(t string) *ast.String

Types

type Parser

type Parser struct{}

func NewParser

func NewParser() *Parser

func (*Parser) Cast

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

Cast returns a type cast expression. ClickHouse uses CAST(expr AS type) syntax, same as MySQL.

func (*Parser) Param

func (p *Parser) Param(n int, numbered bool) string

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) 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. ClickHouse uses backticks or double quotes 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.

Jump to

Keyboard shortcuts

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