Help us shape the future of Go! Take the 2026 Go Developer Survey

driver

package module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 14 Imported by: 0

README

Install

go get github.com/vczyh/go-mysql-driver

Usage

import _ "github.com/vczyh/go-mysql-driver"

db, err := sql.Open("mysql", "mysql://root:Unicloud@1221@10.0.44.59:3306")
if err != nil {
	// handle error
}

if err := db.Ping(); err != nil { 
	// handle error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

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

func (*Driver) Open

func (d *Driver) Open(name string) (driver.Conn, error)

Open called by database/sql when need create new mysql connection Name format: mysql://user:password@ip:port?loc=UTC

type Stmt

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

func (*Stmt) CheckNamedValue

func (stmt *Stmt) CheckNamedValue(nv *driver.NamedValue) error

CheckNamedValue refer to database/sql/driver/types.go:ConvertValue()

func (*Stmt) Close

func (stmt *Stmt) Close() error

func (*Stmt) Exec

func (stmt *Stmt) Exec(args []driver.Value) (driver.Result, error)

func (*Stmt) NumInput

func (stmt *Stmt) NumInput() int

func (*Stmt) Query

func (stmt *Stmt) Query(args []driver.Value) (driver.Rows, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL