Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialect ¶
type Dialect interface { // EscapeIdent safely escapes identificatiors (such as column or table // names, etc.) EscapeIdent(w io.Writer, ident string) // EscapeBool safely escapes boolean variables. EscapeBool(w io.Writer, v bool) // EscapeString safely escapes strings. EscapeString(w io.Writer, s string) // EscapeBytes safely escapes byte slices. EscapeBytes(w io.Writer, b []byte) // EscapeTime safely escapes time.Time variables. EscapeTime(w io.Writer, t time.Time) // PrintPlaceholderSign prints nth placeholder sign starting from 1. PrintPlaceholderSign(w io.Writer, n int) }
Dialect is the interface that describes a dialect of a particular SQL driver.
var MySQL Dialect = mySQL{}
MySQL is the implementation of Dialect for MySQL drivers.
Note that the EscapeTime method ignores the time zone, so if you want to work with time zones different from your MySQL connection time zone setting, you must convert it first.
Click to show internal directories.
Click to hide internal directories.