Documentation ¶
Index ¶
- Constants
- type MySQLConfig
- type MysqlConnector
- func (conn *MysqlConnector) CheckTableUpdatedSince(database string, tables []string, time time.Time) (updated bool, err error)
- func (conn *MysqlConnector) Close()
- func (conn *MysqlConnector) Execute(query string, args ...any) (sql.Result, error)
- func (conn *MysqlConnector) ExecuteSelect(query string, args ...any) (*sql.Rows, error)
Constants ¶
View Source
const (
SQLTimeFormatLayout = "2006-01-02 15:04:05"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLConfig ¶
type MySQLConfig struct { Host string Port int UserName string Password string DBName string Collation string // e.g. utf8_general_ci MaxAllowedPacket int // in byts Location *time.Location ConnectTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration MaxIdleConns int MaxOpenConns int ConnMaxLifetime time.Duration }
type MysqlConnector ¶ added in v0.0.3
type MysqlConnector struct {
// contains filtered or unexported fields
}
func NewMockedMySQLConnector ¶ added in v0.1.4
func NewMockedMySQLConnector(conn *sql.DB) *MysqlConnector
return MysqlConnector with setting client to given connection its expected to provide mocked conn while calling this api
func NewMySQLConnector ¶
func NewMySQLConnector(cfg MySQLConfig) (*MysqlConnector, error)
return the new MySQL connector
func (*MysqlConnector) CheckTableUpdatedSince ¶ added in v0.3.4
func (conn *MysqlConnector) CheckTableUpdatedSince(database string, tables []string, time time.Time) (updated bool, err error)
to use this function ensure that mysql connection user have select privileges on INFORMATION_SCHEMA.PARTITIONS retrun true if data is updated in the table
func (*MysqlConnector) Close ¶ added in v0.0.3
func (conn *MysqlConnector) Close()
close the Aerospike client connection
func (*MysqlConnector) ExecuteSelect ¶ added in v0.0.3
execute the select queries
Click to show internal directories.
Click to hide internal directories.