Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialect ¶
type MySQL ¶
type MySQL struct{}
func (MySQL) Placeholder ¶
func (MySQL) QuoteIdent ¶
func (MySQL) QuoteLiteral ¶
QuoteLiteral renders a Go value as a MySQL SQL literal. Strings escape `\` and `'` (MySQL interprets backslash sequences by default, unlike Postgres). Bytes use the hex literal form `X'..'`. Times are formatted as `'YYYY-MM-DD HH:MM:SS[.ffffff]'` in UTC; MySQL DATETIME / TIMESTAMP accept this for any precision up to microseconds. Unknown types fall back to fmt.Sprint and are quoted as strings.
type Postgres ¶
type Postgres struct{}
func (Postgres) Placeholder ¶
func (Postgres) QuoteIdent ¶
func (Postgres) QuoteLiteral ¶
QuoteLiteral renders a Go value as a Postgres SQL literal. Strings are single-quoted with `'` escaped by doubling (standard_conforming_strings is assumed on; backslashes are literal). Bytea uses the hex format (`'\x..'`). Times are RFC3339Nano with single quotes; Postgres parses that for DATE / TIMESTAMP / TIMESTAMPTZ alike. Unknown types fall back to fmt.Sprint and are quoted as strings.