mirror of https://github.com/go-gorm/gorm.git
commit
edecbde19d
|
@ -117,7 +117,7 @@ db, err := gorm.Open("postgres", "user=gorm dbname=gorm sslmode=disable")
|
|||
|
||||
// You can also use an existing database connection handle
|
||||
// dbSql, _ := sql.Open("postgres", "user=gorm dbname=gorm sslmode=disable")
|
||||
// db := gorm.Open("postgres", dbSql)
|
||||
// db, _ := gorm.Open("postgres", dbSql)
|
||||
|
||||
// Get database connection handle [*sql.DB](http://golang.org/pkg/database/sql/#DB)
|
||||
db.DB()
|
||||
|
|
Loading…
Reference in New Issue