Documentation ¶
Overview ¶
MySQL driver for Go sql package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(query string)
Registers initialisation commands. This is workaround, see http://codereview.appspot.com/5706047
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) Open ¶
Open new connection. The uri need to have the following syntax:
[PROTOCOL_SPECFIIC*]DBNAME/USER/PASSWD
where protocol spercific part may be empty (this means connection to local server using default protocol). Currently possible forms:
DBNAME/USER/PASSWD unix:SOCKPATH*DBNAME/USER/PASSWD unix:SOCKPATH,OPTIONS*DBNAME/USER/PASSWD tcp:ADDR*DBNAME/USER/PASSWD tcp:ADDR,OPTIONS*DBNAME/USER/PASSWD
OPTIONS can contain comma separated list of options in form:
opt1=VAL1,opt2=VAL2,boolopt3,boolopt4
Currently implemented options:
laddr - local address/port (eg. 1.2.3.4:0) timeout - connect timeout in format accepted by time.ParseDuration
Click to show internal directories.
Click to hide internal directories.