Documentation
¶
Overview ¶
Package clickhouse is the ClickHouse dialect: positional placeholders and backtick-quoted identifiers.
It imports the render layer and nothing else. See the postgres package in this directory for why each dialect is its own package.
The constructs that only ClickHouse has live in github.com/ubgo/sqlb/ch.
Index ¶
Constants ¶
const Name = render.DialectClickHouse
Name is the engine name this dialect reports. Engine packages guard on it.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialect ¶
type Dialect struct{}
Dialect renders ? placeholders and backtick-quoted identifiers.
It deliberately does not satisfy render.Returning. ClickHouse has no RETURNING, so a write builder asked for one fails at Build instead of producing a statement the server rejects. Declining to implement an optional interface is how a dialect says "I cannot do this" without lying.
func (Dialect) Placeholder ¶
Placeholder renders ?. ClickHouse placeholders are positional.
func (Dialect) QuoteIdent ¶
QuoteIdent backtick-quotes an identifier, doubling any embedded backtick. ClickHouse uses backticks where Postgres and SQLite use double quotes, which is most of what a dialect is for.