Documentation
¶
Index ¶
- func CheckDatabaseName(databaseName string) bool
- func CheckTableName(tableName string) bool
- func EscapeApostrophes(dataString string) string
- func EscapeDoubleQuotes(dataString string) string
- func EscapeMySQLString(dataString string) string
- func NullStringToString(nullString sql.NullString) string
- type MySQLdb
- func (conn *MySQLdb) Close() error
- func (conn *MySQLdb) Connect(checkENV ...bool) error
- func (conn *MySQLdb) Exec(query string, args ...any) (sql.Result, error)
- func (conn *MySQLdb) GetRowsInfo(rows *sql.Rows) ([]struct{ ... }, map[string]string, error)
- func (conn *MySQLdb) GetSQLTableInfo(tableName string) ([]struct{ ... }, map[string]string, error)
- func (conn *MySQLdb) GetTableInfo(tableName string) ([]struct{ ... }, map[string]string, error)
- func (conn *MySQLdb) LockTables(Tables ...string) error
- func (conn *MySQLdb) Query(query string, args ...any) (*sql.Rows, error)
- func (conn *MySQLdb) QueryRecords(query string, args ...any) ([]map[string]any, error)
- func (conn *MySQLdb) QueryRow(query string, args ...any) *sql.Row
- func (conn *MySQLdb) ScanRows(sqlRows *sql.Rows) ([]map[string]any, error)
- func (conn *MySQLdb) ShowDatabases() ([]string, error)
- func (conn *MySQLdb) ShowTables() ([]string, error)
- func (conn *MySQLdb) ShowTablesMap() (map[string]map[string]string, error)
- func (conn *MySQLdb) TableExists(tableName string) (bool, error)
- func (conn *MySQLdb) UnlockTables() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDatabaseName ¶
func CheckTableName ¶
func EscapeApostrophes ¶
func EscapeDoubleQuotes ¶
func EscapeMySQLString ¶
func NullStringToString ¶
func NullStringToString(nullString sql.NullString) string
Types ¶
type MySQLdb ¶
type MySQLdb struct { //-------------------- Host string //-------------------- User string Password string AllowNativePasswords bool //-------------------- Database string //-------------------- AutoCreate bool //-------------------- DB *sql.DB }
func (*MySQLdb) GetRowsInfo ¶
func (*MySQLdb) GetSQLTableInfo ¶
func (*MySQLdb) GetTableInfo ¶
func (*MySQLdb) LockTables ¶
func (*MySQLdb) QueryRecords ¶
func (*MySQLdb) ShowDatabases ¶
func (*MySQLdb) ShowTables ¶
func (*MySQLdb) ShowTablesMap ¶
func (*MySQLdb) UnlockTables ¶
Click to show internal directories.
Click to hide internal directories.