forked from mirror/gorm
Fix README
This commit is contained in:
parent
1086009fce
commit
65e594e2d6
|
@ -97,9 +97,9 @@ import _ "github.com/lib/pq"
|
||||||
// import _ "github.com/go-sql-driver/mysql"
|
// import _ "github.com/go-sql-driver/mysql"
|
||||||
// import _ "github.com/mattn/go-sqlite3"
|
// import _ "github.com/mattn/go-sqlite3"
|
||||||
|
|
||||||
db, err := Open("postgres", "user=gorm dbname=gorm sslmode=disable")
|
db, err := gorm.Open("postgres", "user=gorm dbname=gorm sslmode=disable")
|
||||||
// db, err = Open("mysql", "gorm:gorm@/gorm?charset=utf8&parseTime=True")
|
// db, err = gorm.Open("mysql", "gorm:gorm@/gorm?charset=utf8&parseTime=True")
|
||||||
// db, err = Open("sqlite3", "/tmp/gorm.db")
|
// db, err = gorm.Open("sqlite3", "/tmp/gorm.db")
|
||||||
|
|
||||||
// Get database connection handle [*sql.DB](http://golang.org/pkg/database/sql/#DB)
|
// Get database connection handle [*sql.DB](http://golang.org/pkg/database/sql/#DB)
|
||||||
d := db.DB()
|
d := db.DB()
|
||||||
|
|
Loading…
Reference in New Issue