Documentation ¶
Index ¶
- Constants
- func AllowAllFiles(value bool) dialects.Option
- func AllowCleartextPasswords(value bool) dialects.Option
- func AllowNativePasswords(value bool) dialects.Option
- func AllowOldPasswords(value bool) dialects.Option
- func Charset(value string) dialects.Option
- func ClientFoundRows(value bool) dialects.Option
- func Collation(value string) dialects.Option
- func ColumnsWithAlias(value bool) dialects.Option
- func DefaultStringSize(value *uint) dialects.Option
- func DisableDatetimePrecision(value *bool) dialects.Option
- func DontSupportRenameColumn(value *bool) dialects.Option
- func DontSupportRenameIndex(value *bool) dialects.Option
- func Env(env *Environment) dialects.Option
- func Extension(f dialects.Extension) dialects.Option
- func InstanceName(value string) dialects.Option
- func InterpolateParams(value bool) dialects.Option
- func Loc(value string) dialects.Option
- func MaxAllowedPacket(value int) dialects.Option
- func MultiStatements(value bool) dialects.Option
- func ParseTime(value bool) dialects.Option
- func Protocol(value string) dialects.Option
- func ReadTimeout(value string) dialects.Option
- func RejectReadOnly(value bool) dialects.Option
- func ServerPubKey(value string) dialects.Option
- func SkipInitializeWithVersion(value *bool) dialects.Option
- func Timeout(value string) dialects.Option
- func Tls(value string) dialects.Option
- func WriteTimeout(value string) dialects.Option
- type Builder
- func (b *Builder) Build(user, password, host string, port int, dbname string) gorm.Dialector
- func (b *Builder) BuildDialector(url string) gorm.Dialector
- func (b *Builder) BuildString(user, password, host string, port int, dbname string) string
- func (b *Builder) IsNotAvailableLock(err error) bool
- func (b *Builder) Name() string
- func (b *Builder) Put(k string, v string) *Builder
- type Environment
Constants ¶
View Source
const ( DefaultPort = "3306" NotAvailableLock = 3572 )
Variables ¶
This section is empty.
Functions ¶
func AllowAllFiles ¶
func AllowCleartextPasswords ¶
func AllowNativePasswords ¶
func AllowOldPasswords ¶
func ClientFoundRows ¶
func ColumnsWithAlias ¶
func DefaultStringSize ¶
func DontSupportRenameColumn ¶
func DontSupportRenameIndex ¶
func Env ¶
func Env(env *Environment) dialects.Option
func InstanceName ¶
func InterpolateParams ¶
func MaxAllowedPacket ¶
func MultiStatements ¶
func ReadTimeout ¶
func RejectReadOnly ¶
func ServerPubKey ¶
func WriteTimeout ¶
Types ¶
type Builder ¶
type Builder struct { InstanceName string Protocol string AllowAllFiles bool AllowCleartextPasswords bool AllowNativePasswords *bool AllowOldPasswords bool Charset string Collation string ClientFoundRows bool ColumnsWithAlias bool InterpolateParams bool Loc string MaxAllowedPacket int MultiStatements bool ParseTime bool ReadTimeout string RejectReadOnly bool ServerPubKey string Timeout string Tls string WriteTimeout string SystemVariables map[string]string SkipInitializeWithVersion bool DefaultStringSize uint DisableDatetimePrecision bool DontSupportRenameIndex bool DontSupportRenameColumn bool Extension dialects.Extension }
func (*Builder) BuildString ¶
func (*Builder) IsNotAvailableLock ¶
type Environment ¶
type Environment struct { InstanceName string Protocol string AllowAllFiles string AllowCleartextPasswords string AllowNativePasswords string AllowOldPasswords string Charset string Collation string ClientFoundRows string ColumnsWithAlias string InterpolateParams string Loc string MaxAllowedPacket string MultiStatements string ParseTime string ReadTimeout string RejectReadOnly string ServerPubKey string Timeout string Tls string WriteTimeout string SkipInitializeWithVersion string DefaultStringSize string DisableDatetimePrecision string DontSupportRenameIndex string DontSupportRenameColumn string }
func (*Environment) Build ¶
func (env *Environment) Build(b *Builder)
Click to show internal directories.
Click to hide internal directories.