GORM Oracle driver for connect Oracle DB and Manage Oracle DB, Based on CengSin/oracle ,not recommended for use in a production environment
- Oracle 12C+
- Golang 1.13+
- see ODPI-C Installation.
- gorm 1.24.0+
- godror 0.33+
Another library that uses the go-ora driver, gorm-oracle, does not require the installation of an Oracle client
go get github.com/dzwvip/oracle
import (
"fmt"
"github.com/dzwvip/oracle"
"gorm.io/gorm"
"log"
)
func main() {
dsn := "oracle://system:password@127.0.0.1:1521/orcl"
db, err := gorm.Open(oracle.Open(dsn), &gorm.Config{})
if err != nil {
// panic error or log error info
}
// do somethings
}