GORM Oracle driver for connect Oracle DB and Manage Oracle DB, Based on stevefan1999-personal/gorm-driver-oracle ,not recommended for use in a production environment
- Oracle 12C+
- Golang 1.13+
- see ODPI-C Installation.
go get github.com/rahmanme/oracle
import (
"fmt"
"github.com/rahmanme/oracle"
"gorm.io/gorm"
"log"
)
func main() {
db, err := gorm.Open(oracle.Open("system/oracle@127.0.0.1:1521/XE"), &gorm.Config{})
if err != nil {
// panic error or log error info
}
// do somethings
}