Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidConn = errors.New("invalid connection") ErrMalformPkt = errors.New("malformed packet") ErrNoTLS = errors.New("TLS requested but server does not support TLS") ErrCleartextPassword = errors.New("this user requires clear text authentication. If you still want to use it, please add 'allowCleartextPasswords=1' to your DSN") ErrNativePassword = errors.New("this user requires mysql native password authentication.") ErrOldPassword = errors.New("this user requires old password authentication. If you still want to use it, please add 'allowOldPasswords=1' to your DSN. See also https://github.com/go-sql-driver/mysql/wiki/old_passwords") ErrUnknownPlugin = errors.New("this authentication plugin is not supported") ErrOldProtocol = errors.New("MySQL server does not support required protocol 41+") ErrPktSync = errors.New("commands out of sync. You can't run this command now") ErrPktSyncMul = errors.New("commands out of sync. Did you run multiple statements at once?") ErrPktTooLarge = errors.New("packet for query is too large. Try adjusting the 'max_allowed_packet' variable on the server") ErrBusyBuffer = errors.New("busy buffer") ErrParameterMissing = errors.New("Parameter Missing") ErrCrossDatabase func(string) error = func(tableName string) error { return errors.New("Cmd use different databases :" + tableName) } ErrWrongDML = errors.New("wrong DML") )
Various errors the driver might return. Can change between driver versions.
Functions ¶
Types ¶
type AliasEntityKeyPair ¶
type AliasEntityKeyPair struct {
EntityName string
Alias string
Key KeyAndValue
}
func (*AliasEntityKeyPair) IsNullObject ¶
func (p *AliasEntityKeyPair) IsNullObject() bool
type EntityKeyPair ¶
type EntityKeyPair map[string]AliasEntityKeyPair
func (*EntityKeyPair) CheckAllEntitiesInSameDatabase ¶
func (ekp *EntityKeyPair) CheckAllEntitiesInSameDatabase(ruleConfig configmanager.Config) error
func (*EntityKeyPair) SetKey ¶
func (ekp *EntityKeyPair) SetKey(entityName, key string, value idgenerator.IdStruct)
type KeyAndValue ¶
type KeyAndValue struct {
Key string
Value idgenerator.IdStruct
}
func (*KeyAndValue) IsNullObject ¶
func (kv *KeyAndValue) IsNullObject() bool
type SqlStringAndEnitityData ¶
type SqlStringAndEnitityData struct {
SqlString string
PrepareArgs []interface{}
EntityData EntityKeyPair
}
func ParseWithVarMap ¶
func ParseWithVarMap(ruleConfig configmanager.Config, sql string, args map[string]interface{}) (result SqlStringAndEnitityData, parserErr error)
func (*SqlStringAndEnitityData) GetTarget ¶
func (ss *SqlStringAndEnitityData) GetTarget() AliasEntityKeyPair
Click to show internal directories.
Click to hide internal directories.