Documentation
¶
Index ¶
- Constants
- type ADBMysql
- func (cn *ADBMysql) CloseConnection() error
- func (cn *ADBMysql) DB() *bun.DB
- func (cn *ADBMysql) GetAddress() string
- func (cn *ADBMysql) GetConnectionTimeout() int
- func (cn *ADBMysql) GetSandboxAdapter() (aconns.ISBAdapter, error)
- func (cn *ADBMysql) OpenConnection() error
- func (cn *ADBMysql) SQLDB() *sql.DB
- func (cn *ADBMysql) Test() (bool, aconns.TestStatus, error)
- func (cn *ADBMysql) Validate() error
- type ADBMysqls
Constants ¶
View Source
const ( ADAPTERTYPE_MYSQL aconns.AdapterType = "mysql" ADAPTERTYPE_MARIA aconns.AdapterType = "maria" MYSQL_DEFAULT_PORT = 3306 MYSQL_CONNECTION_TIMEOUT = 30 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ADBMysql ¶
type ADBMysql struct {
aconns.ADBAdapterBase
ConnectionTimeout int `json:"connectionTimeout,omitempty"`
// contains filtered or unexported fields
}
ADBMysql represents a MySQL database adapter.
func (*ADBMysql) CloseConnection ¶
CloseConnection closes the connection to the MySQL database.
func (*ADBMysql) GetAddress ¶
GetAddress returns the address of the MySQL server.
func (*ADBMysql) GetConnectionTimeout ¶
GetConnectionTimeout returns the connection timeout.
func (*ADBMysql) GetSandboxAdapter ¶
func (cn *ADBMysql) GetSandboxAdapter() (aconns.ISBAdapter, error)
GetSandboxAdapter returns a sandbox adapter for the MySQL database. It ensures that the ADBMysql instance and its SQLDB are properly initialized.
func (*ADBMysql) OpenConnection ¶
OpenConnection opens a connection to the MySQL database.
Click to show internal directories.
Click to hide internal directories.