mssqlx: github.com/linxGnu/mssqlx Index | Files

package mssqlx

import "github.com/linxGnu/mssqlx"

Index

Package Files

balancer.go errors.go mssqlx.go types.go

Constants

const (
    // DefaultHealthCheckPeriodInMilli default period in millisecond mssqlx should do a health check of failed database
    DefaultHealthCheckPeriodInMilli = 40
)

Variables

var (
    // ErrNetwork networking error
    ErrNetwork = errors.New("Network error/Connection refused")

    // ErrNoConnection there is no connection to db
    ErrNoConnection = errors.New("No connection available")

    // ErrNoConnectionOrWsrep there is no connection to db or Wsrep is not ready
    ErrNoConnectionOrWsrep = errors.New("No connection available or Wsrep is not ready")
)

type DBs Uses

type DBs struct {
    // contains filtered or unexported fields
}

DBs sqlx wrapper supports querying master-slave database connections for HA and scalability, auto-balancer integrated.

func ConnectMasterSlaves Uses

func ConnectMasterSlaves(driverName string, masterDSNs []string, slaveDSNs []string, args ...interface{}) (*DBs, []error)

ConnectMasterSlaves to master-slave databases and verify with pings. driverName: mysql, postgres, etc. masterDSNs: data source names of Masters. slaveDSNs: data source names of Slaves. args: args[0] = true to indicates galera/wsrep cluster.

func (*DBs) Begin Uses

func (dbs *DBs) Begin() (*sql.Tx, error)

Begin starts a transaction. The default isolation level is dependent on the driver.

Transaction is bound to one of master connections.

func (*DBs) BeginTx Uses

func (dbs *DBs) BeginTx(ctx context.Context, opts *sql.TxOptions) (res *sql.Tx, err error)

BeginTx starts a transaction.

The provided context is used until the transaction is committed or rolled back. If the context is canceled, the sql package will roll back the transaction. Tx.Commit will return an error if the context provided to BeginTx is canceled.

The provided TxOptions is optional and may be nil if defaults should be used. If a non-default isolation level is used that the driver doesn't support, an error will be returned.

Transaction is bound to one of master connections.

func (*DBs) BeginTxx Uses

func (dbs *DBs) BeginTxx(ctx context.Context, opts *sql.TxOptions) (res *sqlx.Tx, err error)

BeginTxx begins a transaction and returns an *sqlx.Tx instead of an *sql.Tx.

The provided context is used until the transaction is committed or rolled back. If the context is canceled, the sql package will roll back the transaction. Tx.Commit will return an error if the context provided to BeginxContext is canceled.

Transaction is bound to one of master connections.

func (*DBs) Beginx Uses

func (dbs *DBs) Beginx() (res *sqlx.Tx, err error)

Beginx begins a transaction and returns an *sqlx.Tx instead of an *sql.Tx.

Transaction is bound to one of master connections.

func (*DBs) BindNamed Uses

func (dbs *DBs) BindNamed(query string, arg interface{}) (string, []interface{}, error)

BindNamed binds a query using the DB driver's bindvar type.

func (*DBs) Destroy Uses

func (dbs *DBs) Destroy() []error

Destroy closes all database connections, releasing any open resources.

It is rare to Close a DB, as the DB handle is meant to be long-lived and shared between many goroutines.

func (*DBs) DestroyMaster Uses

func (dbs *DBs) DestroyMaster() []error

DestroyMaster closes all master database connections, releasing any open resources.

It is rare to Close a DB, as the DB handle is meant to be long-lived and shared between many goroutines.

func (*DBs) DestroySlave Uses

func (dbs *DBs) DestroySlave() []error

DestroySlave closes all master database connections, releasing any open resources.

It is rare to Close a DB, as the DB handle is meant to be long-lived and shared between many goroutines.

func (*DBs) DriverName Uses

func (dbs *DBs) DriverName() string

DriverName returns the driverName passed to the Open function for this DB.

func (*DBs) Exec Uses

func (dbs *DBs) Exec(query string, args ...interface{}) (sql.Result, error)

Exec do exec on masters.

func (*DBs) ExecContext Uses

func (dbs *DBs) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

ExecContext do exec on masters with context

func (*DBs) ExecContextOnSlave Uses

func (dbs *DBs) ExecContextOnSlave(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

ExecContextOnSlave do exec on slaves with context

func (*DBs) ExecOnSlave Uses

func (dbs *DBs) ExecOnSlave(query string, args ...interface{}) (sql.Result, error)

ExecOnSlave do exec on slaves.

func (*DBs) Get Uses

func (dbs *DBs) Get(dest interface{}, query string, args ...interface{}) (err error)

Get on slaves. Any placeholder parameters are replaced with supplied args. An error is returned if the result set is empty.

func (*DBs) GetAllMasters Uses

func (dbs *DBs) GetAllMasters() ([]*sqlx.DB, int)

GetAllMasters get all master database connections, included failing one.

func (*DBs) GetAllSlaves Uses

func (dbs *DBs) GetAllSlaves() ([]*sqlx.DB, int)

GetAllSlaves get all slave database connections, included failing one.

func (*DBs) GetContext Uses

func (dbs *DBs) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) (err error)

GetContext on slaves. Any placeholder parameters are replaced with supplied args. An error is returned if the result set is empty.

func (*DBs) GetContextOnMaster Uses

func (dbs *DBs) GetContextOnMaster(ctx context.Context, dest interface{}, query string, args ...interface{}) (err error)

GetContextOnMaster on masters. Any placeholder parameters are replaced with supplied args. An error is returned if the result set is empty.

func (*DBs) GetOnMaster Uses

func (dbs *DBs) GetOnMaster(dest interface{}, query string, args ...interface{}) (err error)

GetOnMaster on masters. Any placeholder parameters are replaced with supplied args. An error is returned if the result set is empty.

func (*DBs) MapperFunc Uses

func (dbs *DBs) MapperFunc(mf func(string) string)

MapperFunc sets a new mapper for this db using the default sqlx struct tag and the provided mapper function.

func (*DBs) MapperFuncMaster Uses

func (dbs *DBs) MapperFuncMaster(mf func(string) string)

MapperFuncMaster sets a new mapper for this db using the default sqlx struct tag and the provided mapper function.

func (*DBs) MapperFuncSlave Uses

func (dbs *DBs) MapperFuncSlave(mf func(string) string)

MapperFuncSlave sets a new mapper for this db using the default sqlx struct tag and the provided mapper function.

func (*DBs) MustBegin Uses

func (dbs *DBs) MustBegin() *sql.Tx

MustBegin starts a transaction, and panics on error. Transaction is bound to one of master connections.

func (*DBs) MustBeginTx Uses

func (dbs *DBs) MustBeginTx(ctx context.Context, opts *sql.TxOptions) *sqlx.Tx

MustBeginTx starts a transaction, and panics on error. Returns an *sqlx.Tx instead of an *sql.Tx.

The provided context is used until the transaction is committed or rolled back. If the context is canceled, the sql package will roll back the transaction. Tx.Commit will return an error if the context provided to MustBeginContext is canceled.

Transaction is bound to one of master connections.

func (*DBs) MustBeginx Uses

func (dbs *DBs) MustBeginx() *sqlx.Tx

MustBeginx starts a transaction, and panics on error. Returns an *sqlx.Tx instead of an *sql.Tx. Transaction is bound to one of master connections.

func (*DBs) MustExec Uses

func (dbs *DBs) MustExec(query string, args ...interface{}) sql.Result

MustExec do exec on masters and panic on error

func (*DBs) MustExecContext Uses

func (dbs *DBs) MustExecContext(ctx context.Context, query string, args ...interface{}) sql.Result

MustExecContext do exec on masters and panic on error

func (*DBs) MustExecContextOnSlave Uses

func (dbs *DBs) MustExecContextOnSlave(ctx context.Context, query string, args ...interface{}) sql.Result

MustExecContextOnSlave do exec on slave only and panic on error

func (*DBs) MustExecOnSlave Uses

func (dbs *DBs) MustExecOnSlave(query string, args ...interface{}) sql.Result

MustExecOnSlave do exec on slave only and panic on error

func (*DBs) NamedExec Uses

func (dbs *DBs) NamedExec(query string, arg interface{}) (sql.Result, error)

NamedExec do named exec. Any named placeholder parameters are replaced with fields from arg.

func (*DBs) NamedExecContext Uses

func (dbs *DBs) NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error)

NamedExecContext do named exec with context. Any named placeholder parameters are replaced with fields from arg.

func (*DBs) NamedExecContextOnSlave Uses

func (dbs *DBs) NamedExecContextOnSlave(ctx context.Context, query string, arg interface{}) (sql.Result, error)

NamedExecContextOnSlave do named exec with context on slave. Any named placeholder parameters are replaced with fields from arg.

func (*DBs) NamedExecOnSlave Uses

func (dbs *DBs) NamedExecOnSlave(query string, arg interface{}) (sql.Result, error)

NamedExecOnSlave do named exec on slave. Any named placeholder parameters are replaced with fields from arg.

func (*DBs) NamedQuery Uses

func (dbs *DBs) NamedQuery(query string, arg interface{}) (*sqlx.Rows, error)

NamedQuery do named query. Any named placeholder parameters are replaced with fields from arg.

func (*DBs) NamedQueryContext Uses

func (dbs *DBs) NamedQueryContext(ctx context.Context, query string, arg interface{}) (*sqlx.Rows, error)

NamedQueryContext do named query with context. Any named placeholder parameters are replaced with fields from arg.

func (*DBs) NamedQueryContextOnMaster Uses

func (dbs *DBs) NamedQueryContextOnMaster(ctx context.Context, query string, arg interface{}) (*sqlx.Rows, error)

NamedQueryContextOnMaster do named query with context on master. Any named placeholder parameters are replaced with fields from arg.

func (*DBs) NamedQueryOnMaster Uses

func (dbs *DBs) NamedQueryOnMaster(query string, arg interface{}) (*sqlx.Rows, error)

NamedQueryOnMaster do named query on master. Any named placeholder parameters are replaced with fields from arg.

func (*DBs) Ping Uses

func (dbs *DBs) Ping() []error

Ping all master-slave database connections

func (*DBs) PingMaster Uses

func (dbs *DBs) PingMaster() []error

PingMaster all master database connections

func (*DBs) PingSlave Uses

func (dbs *DBs) PingSlave() []error

PingSlave all slave database connections

func (*DBs) Prepare Uses

func (dbs *DBs) Prepare(query string) (db *sqlx.DB, stmt *sql.Stmt, err error)

Prepare creates a prepared statement for later queries or executions on masters. Multiple queries or executions may be run concurrently from the returned statement. The caller must call the statement's Close method when the statement is no longer needed.

func (*DBs) PrepareContext Uses

func (dbs *DBs) PrepareContext(ctx context.Context, query string) (db *sqlx.DB, stmt *sql.Stmt, err error)

PrepareContext creates a prepared statement for later queries or executions on masters. Multiple queries or executions may be run concurrently from the returned statement. The caller must call the statement's Close method when the statement is no longer needed.

func (*DBs) PrepareContextOnSlave Uses

func (dbs *DBs) PrepareContextOnSlave(ctx context.Context, query string) (db *sqlx.DB, stmt *sql.Stmt, err error)

PrepareContextOnSlave creates a prepared statement for later queries or executions on slaves. Multiple queries or executions may be run concurrently from the returned statement. The caller must call the statement's Close method when the statement is no longer needed.

func (*DBs) PrepareNamed Uses

func (dbs *DBs) PrepareNamed(query string) (db *sqlx.DB, stmt *sqlx.NamedStmt, err error)

PrepareNamed returns an sqlx.NamedStmt on masters

func (*DBs) PrepareNamedContext Uses

func (dbs *DBs) PrepareNamedContext(ctx context.Context, query string) (db *sqlx.DB, stmt *sqlx.NamedStmt, err error)

PrepareNamedContext returns an sqlx.NamedStmt on masters

func (*DBs) PrepareNamedContextOnSlave Uses

func (dbs *DBs) PrepareNamedContextOnSlave(ctx context.Context, query string) (db *sqlx.DB, stmt *sqlx.NamedStmt, err error)

PrepareNamedContextOnSlave returns an sqlx.NamedStmt on slaves

func (*DBs) PrepareNamedOnSlave Uses

func (dbs *DBs) PrepareNamedOnSlave(query string) (db *sqlx.DB, stmt *sqlx.NamedStmt, err error)

PrepareNamedOnSlave returns an sqlx.NamedStmt on slaves

func (*DBs) PrepareOnSlave Uses

func (dbs *DBs) PrepareOnSlave(query string) (db *sqlx.DB, stmt *sql.Stmt, err error)

PrepareOnSlave creates a prepared statement for later queries or executions on slaves. Multiple queries or executions may be run concurrently from the returned statement. The caller must call the statement's Close method when the statement is no longer needed.

func (*DBs) Preparex Uses

func (dbs *DBs) Preparex(query string) (db *sqlx.DB, stmt *sqlx.Stmt, err error)

Preparex creates a prepared statement for later queries or executions on masters. But return sqlx.Stmt instead of sql.Stmt. Multiple queries or executions may be run concurrently from the returned statement. The caller must call the statement's Close method when the statement is no longer needed.

func (*DBs) PreparexContext Uses

func (dbs *DBs) PreparexContext(ctx context.Context, query string) (db *sqlx.DB, stmt *sqlx.Stmt, err error)

PreparexContext creates a prepared statement for later queries or executions on masters. But return sqlx.Stmt instead of sql.Stmt. Multiple queries or executions may be run concurrently from the returned statement. The caller must call the statement's Close method when the statement is no longer needed.

func (*DBs) PreparexContextOnSlave Uses

func (dbs *DBs) PreparexContextOnSlave(ctx context.Context, query string) (db *sqlx.DB, stmt *sqlx.Stmt, err error)

PreparexContextOnSlave creates a prepared statement for later queries or executions on slaves. But return sqlx.Stmt instead of sql.Stmt. Multiple queries or executions may be run concurrently from the returned statement. The caller must call the statement's Close method when the statement is no longer needed.

func (*DBs) PreparexOnSlave Uses

func (dbs *DBs) PreparexOnSlave(query string) (db *sqlx.DB, stmt *sqlx.Stmt, err error)

PreparexOnSlave creates a prepared statement for later queries or executions on slaves. But return sqlx.Stmt instead of sql.Stmt. Multiple queries or executions may be run concurrently from the returned statement. The caller must call the statement's Close method when the statement is no longer needed.

func (*DBs) Query Uses

func (dbs *DBs) Query(query string, args ...interface{}) (r *sql.Rows, err error)

Query executes a query on slaves that returns rows, typically a SELECT. The args are for any placeholder parameters in the query.

func (*DBs) QueryContext Uses

func (dbs *DBs) QueryContext(ctx context.Context, query string, args ...interface{}) (r *sql.Rows, err error)

QueryContext executes a query on slaves that returns rows, typically a SELECT. The args are for any placeholder parameters in the query.

func (*DBs) QueryContextOnMaster Uses

func (dbs *DBs) QueryContextOnMaster(ctx context.Context, query string, args ...interface{}) (r *sql.Rows, err error)

QueryContextOnMaster executes a query on masters that returns rows, typically a SELECT. The args are for any placeholder parameters in the query.

func (*DBs) QueryOnMaster Uses

func (dbs *DBs) QueryOnMaster(query string, args ...interface{}) (r *sql.Rows, err error)

QueryOnMaster executes a query on masters that returns rows, typically a SELECT. The args are for any placeholder parameters in the query.

func (*DBs) QueryRow Uses

func (dbs *DBs) QueryRow(query string, args ...interface{}) (r *sql.Row, err error)

QueryRow executes a query on slaves that is expected to return at most one row. QueryRow always returns a non-nil value. Errors are deferred until Row's Scan method is called.

func (*DBs) QueryRowContext Uses

func (dbs *DBs) QueryRowContext(ctx context.Context, query string, args ...interface{}) (r *sql.Row, err error)

QueryRowContext executes a query on slaves that is expected to return at most one row. QueryRow always returns a non-nil value. Errors are deferred until Row's Scan method is called.

func (*DBs) QueryRowContextOnMaster Uses

func (dbs *DBs) QueryRowContextOnMaster(ctx context.Context, query string, args ...interface{}) (r *sql.Row, err error)

QueryRowContextOnMaster executes a query on masters that is expected to return at most one row. QueryRow always returns a non-nil value. Errors are deferred until Row's Scan method is called.

func (*DBs) QueryRowOnMaster Uses

func (dbs *DBs) QueryRowOnMaster(query string, args ...interface{}) (r *sql.Row, err error)

QueryRowOnMaster executes a query on masters that is expected to return at most one row. QueryRow always returns a non-nil value. Errors are deferred until Row's Scan method is called.

func (*DBs) QueryRowx Uses

func (dbs *DBs) QueryRowx(query string, args ...interface{}) (r *sqlx.Row, err error)

QueryRowx executes a query on slaves that is expected to return at most one row. But return sqlx.Row instead of sql.Row. QueryRow always returns a non-nil value. Errors are deferred until Row's Scan method is called.

func (*DBs) QueryRowxContext Uses

func (dbs *DBs) QueryRowxContext(ctx context.Context, query string, args ...interface{}) (r *sqlx.Row, err error)

QueryRowxContext executes a query on slaves that is expected to return at most one row. QueryRow always returns a non-nil value. Errors are deferred until Row's Scan method is called.

func (*DBs) QueryRowxContextOnMaster Uses

func (dbs *DBs) QueryRowxContextOnMaster(ctx context.Context, query string, args ...interface{}) (r *sqlx.Row, err error)

QueryRowxContextOnMaster executes a query on masters that is expected to return at most one row. QueryRow always returns a non-nil value. Errors are deferred until Row's Scan method is called.

func (*DBs) QueryRowxOnMaster Uses

func (dbs *DBs) QueryRowxOnMaster(query string, args ...interface{}) (r *sqlx.Row, err error)

QueryRowxOnMaster executes a query on masters that is expected to return at most one row. QueryRow always returns a non-nil value. Errors are deferred until Row's Scan method is called.

func (*DBs) Queryx Uses

func (dbs *DBs) Queryx(query string, args ...interface{}) (r *sqlx.Rows, err error)

Queryx executes a query on slaves that returns rows, typically a SELECT. The args are for any placeholder parameters in the query.

func (*DBs) QueryxContext Uses

func (dbs *DBs) QueryxContext(ctx context.Context, query string, args ...interface{}) (r *sqlx.Rows, err error)

QueryxContext executes a query on slaves that returns rows, typically a SELECT. The args are for any placeholder parameters in the query.

func (*DBs) QueryxContextOnMaster Uses

func (dbs *DBs) QueryxContextOnMaster(ctx context.Context, query string, args ...interface{}) (r *sqlx.Rows, err error)

QueryxContextOnMaster executes a query on masters that returns rows, typically a SELECT. The args are for any placeholder parameters in the query.

func (*DBs) QueryxOnMaster Uses

func (dbs *DBs) QueryxOnMaster(query string, args ...interface{}) (r *sqlx.Rows, err error)

QueryxOnMaster executes a query on masters that returns rows, typically a SELECT. The args are for any placeholder parameters in the query.

func (*DBs) Rebind Uses

func (dbs *DBs) Rebind(query string) string

Rebind transforms a query from QUESTION to the DB driver's bindvar type.

func (*DBs) Select Uses

func (dbs *DBs) Select(dest interface{}, query string, args ...interface{}) (err error)

Select do select on slaves. Any placeholder parameters are replaced with supplied args.

func (*DBs) SelectContext Uses

func (dbs *DBs) SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) (err error)

SelectContext do select on slaves with context. Any placeholder parameters are replaced with supplied args.

func (*DBs) SelectContextOnMaster Uses

func (dbs *DBs) SelectContextOnMaster(ctx context.Context, dest interface{}, query string, args ...interface{}) (err error)

SelectContextOnMaster do select on masters with context. Any placeholder parameters are replaced with supplied args.

func (*DBs) SelectOnMaster Uses

func (dbs *DBs) SelectOnMaster(dest interface{}, query string, args ...interface{}) (err error)

SelectOnMaster do select on masters. Any placeholder parameters are replaced with supplied args.

func (*DBs) SetConnMaxLifetime Uses

func (dbs *DBs) SetConnMaxLifetime(d time.Duration)

SetConnMaxLifetime sets the maximum amount of time a master-slave connection may be reused.

Expired connections may be closed lazily before reuse.

If d <= 0, connections are reused forever.

func (*DBs) SetHealthCheckPeriod Uses

func (dbs *DBs) SetHealthCheckPeriod(period uint64)

SetHealthCheckPeriod sets the period (in millisecond) for checking health of failed nodes for automatic recovery.

Default is 500

func (*DBs) SetMasterConnMaxLifetime Uses

func (dbs *DBs) SetMasterConnMaxLifetime(d time.Duration)

SetMasterConnMaxLifetime sets the maximum amount of time a master connection may be reused.

Expired connections may be closed lazily before reuse.

If d <= 0, connections are reused forever.

func (*DBs) SetMasterHealthCheckPeriod Uses

func (dbs *DBs) SetMasterHealthCheckPeriod(period uint64)

SetMasterHealthCheckPeriod sets the period (in millisecond) for checking health of failed master nodes for automatic recovery.

Default is 500

func (*DBs) SetMasterMaxIdleConns Uses

func (dbs *DBs) SetMasterMaxIdleConns(n int)

SetMasterMaxIdleConns sets the maximum number of connections in the idle connection pool for masters.

If MaxOpenConns is greater than 0 but less than the new MaxIdleConns then the new MaxIdleConns will be reduced to match the MaxOpenConns limit

If n <= 0, no idle connections are retained.

func (*DBs) SetMasterMaxOpenConns Uses

func (dbs *DBs) SetMasterMaxOpenConns(n int)

SetMasterMaxOpenConns sets the maximum number of open connections to the master databases.

If MaxIdleConns is greater than 0 and the new MaxOpenConns is less than MaxIdleConns, then MaxIdleConns will be reduced to match the new MaxOpenConns limit

If n <= 0, then there is no limit on the number of open connections. The default is 0 (unlimited).

func (*DBs) SetMaxIdleConns Uses

func (dbs *DBs) SetMaxIdleConns(n int)

SetMaxIdleConns sets the maximum number of connections in the idle connection pool for all masters-slaves.

If MaxOpenConns is greater than 0 but less than the new MaxIdleConns then the new MaxIdleConns will be reduced to match the MaxOpenConns limit

If n <= 0, no idle connections are retained.

func (*DBs) SetMaxOpenConns Uses

func (dbs *DBs) SetMaxOpenConns(n int)

SetMaxOpenConns sets the maximum number of open connections to all master-slave databases.

If MaxIdleConns is greater than 0 and the new MaxOpenConns is less than MaxIdleConns, then MaxIdleConns will be reduced to match the new MaxOpenConns limit

If n <= 0, then there is no limit on the number of open connections. The default is 0 (unlimited).

func (*DBs) SetSlaveConnMaxLifetime Uses

func (dbs *DBs) SetSlaveConnMaxLifetime(d time.Duration)

SetSlaveConnMaxLifetime sets the maximum amount of time a slave connection may be reused.

Expired connections may be closed lazily before reuse.

If d <= 0, connections are reused forever.

func (*DBs) SetSlaveHealthCheckPeriod Uses

func (dbs *DBs) SetSlaveHealthCheckPeriod(period uint64)

SetSlaveHealthCheckPeriod sets the period (in millisecond) for checking health of failed slave nodes for automatic recovery.

Default is 500

func (*DBs) SetSlaveMaxIdleConns Uses

func (dbs *DBs) SetSlaveMaxIdleConns(n int)

SetSlaveMaxIdleConns sets the maximum number of connections in the idle connection pool for slaves.

If MaxOpenConns is greater than 0 but less than the new MaxIdleConns then the new MaxIdleConns will be reduced to match the MaxOpenConns limit

If n <= 0, no idle connections are retained.

func (*DBs) SetSlaveMaxOpenConns Uses

func (dbs *DBs) SetSlaveMaxOpenConns(n int)

SetSlaveMaxOpenConns sets the maximum number of open connections to the slave databases.

If MaxIdleConns is greater than 0 and the new MaxOpenConns is less than MaxIdleConns, then MaxIdleConns will be reduced to match the new MaxOpenConns limit

If n <= 0, then there is no limit on the number of open connections. The default is 0 (unlimited).

func (*DBs) Stats Uses

func (dbs *DBs) Stats() (stats []sql.DBStats)

Stats returns database statistics.

func (*DBs) StatsMaster Uses

func (dbs *DBs) StatsMaster() (stats []sql.DBStats)

StatsMaster returns master database statistics.

func (*DBs) StatsSlave Uses

func (dbs *DBs) StatsSlave() (stats []sql.DBStats)

StatsSlave returns slave database statistics.

Package mssqlx imports 12 packages (graph). Updated 2019-04-01. Refresh now. Tools for package owners.