Documentation ¶
Index ¶
- type Option
- type Setting
- func SetAllowAllFiles(ok bool) Setting
- func SetAllowCleartextPasswords(ok bool) Setting
- func SetAllowNativePasswords(ok bool) Setting
- func SetAutoCommit(ok bool) Setting
- func SetCharset(v string) Setting
- func SetClientFoundRows(ok bool) Setting
- func SetCollation(v string) Setting
- func SetColumnsWithAlias(ok bool) Setting
- func SetInterpolateParams(ok bool) Setting
- func SetLoc(v string) Setting
- func SetParseTime(ok bool) Setting
- func SetReadTimeout(timeout time.Duration) Setting
- func SetStrict(ok bool) Setting
- func SetTimeout(timeout time.Duration) Setting
- func SetWriteTimeout(timeout time.Duration) Setting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
Option stands for a series of options for creating a DB
type Setting ¶
Setting is the signature of setting function
func SetAllowAllFiles ¶
SetAllowAllFiles allowAllFiles=true disables the file Whitelist for LOAD DATA LOCAL INFILE and allows all files. Might be insecure!
func SetAllowCleartextPasswords ¶
SetAllowCleartextPasswords allowCleartextPasswords=true allows using the cleartext client side plugin if required by an account, such as one defined with the PAM authentication plugin. Sending passwords in clear text may be a security problem in some configurations.
func SetAllowNativePasswords ¶
SetAllowNativePasswords allows the usage of the mysql native password method
func SetAutoCommit ¶
SetAutoCommit set it to true if you know what you are doing
func SetCharset ¶
SetCharset Sets the charset used for client-server interaction
func SetClientFoundRows ¶
SetClientFoundRows clientFoundRows=true causes an UPDATE to return the number of matching rows instead of the number of rows changed.
func SetCollation ¶
SetCollation Sets the collation used for client-server interaction on connection. In contrast to charset, collation does not issue additional queries. If the specified collation is unavailable on the target server, the connection will fail.
func SetColumnsWithAlias ¶
SetColumnsWithAlias When columnsWithAlias is true, calls to sql.Rows.Columns() will return the table alias and the column name separated by a dot.
func SetInterpolateParams ¶
SetInterpolateParams If interpolateParams is true, placeholders (?) in calls to db.Query() and db.Exec() are interpolated into a single query string with given parameters. This reduces the number of roundtrips, since the driver has to prepare a statement, execute it with given parameters and close the statement again with interpolateParams=false.
func SetLoc ¶
SetLoc Sets the location for time.Time values (when using parseTime=true). "Local" sets the system's location. See time.LoadLocation for details.
func SetParseTime ¶
SetParseTime parseTime=true changes the output type of DATE and DATETIME values to time.Time instead of []byte / string
func SetReadTimeout ¶
SetReadTimeout I/O read timeout. The value must be a decimal number with an unit suffix ( "ms", "s", "m", "h" ), such as "30s", "0.5m" or "1m30s".
func SetStrict ¶
SetStrict strict=true enables the strict mode in which MySQL warnings are treated as errors.
func SetTimeout ¶
SetTimeout Driver side connection timeout. The value must be a decimal number with an unit suffix ( "ms", "s", "m", "h" ), such as "30s", "0.5m" or "1m30s". To set a server side timeout, use the parameter wait_timeout.
func SetWriteTimeout ¶
SetWriteTimeout I/O write timeout. The value must be a decimal number with an unit suffix ( "ms", "s", "m", "h" ), such as "30s", "0.5m" or "1m30s".