Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DSNFormatter ¶
type DSNFormatter interface {
FormatDSN() string
}
DSNFormatter is an interface for types which implement FormatDSN method, such as mysql.Config, xdbutils_sqlite.SQLiteConfig and xdbutils_postgres.PostgreSQLConfig.
type MySQLExtraConfig ¶
type MySQLExtraConfig struct { AllowFallbackToPlaintext *bool // True allowFallbackToPlaintext acts like a --ssl-mode=PREFERRED MySQL client as described Charset string // Sets the charset used for client-server interaction, prefer "utf8mb4,utf8" Autocommit *bool // In MySQL, autocommit is default to true TimeZone string // such as: Europe/Paris, https://dev.mysql.com/doc/refman/8.0/en/time-zone-support.html TransactionIsolation string // such as: REPEATABLE-READ, https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_transaction_isolation SQLMode string // such as: TRADITIONAL, https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html. SysVar string // such as: esc@ped OtherParams map[string]string // more custom params }
MySQLExtraConfig is an extra configuration for MySQL, can be used to generate mysql.Config.Params by ToParams method.
Please visit the follow links for more information: - https://github.com/go-sql-driver/mysql#dsn-data-source-name - https://dev.mysql.com/doc/refman/8.0/en/connecting-using-uri-or-key-value-pairs.html
func (*MySQLExtraConfig) ToParams ¶
func (m *MySQLExtraConfig) ToParams() map[string]string
ToParams generates a parameter map for mysql.Config.Params from MySQLExtraConfig.
Click to show internal directories.
Click to hide internal directories.