Documentation
¶
Overview ¶
Package mariadb provides constructor to connect to mariadb with standard sql
Index ¶
Constants ¶
View Source
const ( ProtocolTCP = "tcp" ProtocolUNIXSocket = "unix" )
Protocol = UNIXSocket, Address = "/tmp/mysql.sock" Protocol = TCP, Address = "localhost:5555"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Protocol string Address string Schema string User string Password string Charset string }
Config describe connection params to database
type DBQuery ¶
type DBQuery interface { Exec(query string, args ...interface{}) (sql.Result, error) Query(query string, args ...interface{}) (*sql.Rows, error) QueryRow(query string, args ...interface{}) *sql.Row Begin() (*sql.Tx, error) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) Close() error types.SQLLogger }
DBQuery describe interface
Click to show internal directories.
Click to hide internal directories.