Skip to content

syhlion/sqlwrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sqlwrapper

Install

go get github.com/syhlion/sqlwrapper

Usage

func main(){
    db, err := sql.Open("xxx","xxx")
    if err != nil {
        return nil, err
    }
    db := WrapperDB(db,true,1*time.Second)


    // it log [sql] select * from member where id = ?  1  2s
    rs,err:=db.Exec("select * from member where id = ?",1)
    if err != nil {
        return
    }

}

About

sql wrapper it log sql command

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages