简体   繁体   English

在 golang 中使用 gorm 连接到 Oracle 数据库

[英]Connecting to Oracle database with gorm in golang

Previously i was using godror package to connect to oracle database client.以前我使用godror包连接到 oracle 数据库客户端。 And now i want to implement ORM in my system and want to connect to oracle using GORM package but it seems i am unable to do it though.现在我想在我的系统中实现ORM并想使用 GORM 包连接到 oracle,但似乎我无法做到。 I did found out a package https://github.com/CengSin/oracle but the package installation seem to fail.我确实找到了一个包https://github.com/CengSin/oracle但包安装似乎失败了。 Trying: go get github.com/cengsin/oracle尝试: go get github.com/cengsin/oracle

I seem to be stuck on this.我似乎被困在这一点上。

So, it seems that while installing package go get github.com/cengsin/oracle , gorm package needed to be of version less than or equal to v1.20.1.因此,似乎在安装包go get github.com/cengsin/oracle时,gorm 包的版本需要小于或等于 v1.20.1。 I downgraded my gorm package to version 1.20.1 and it solved my issue.我将我的 gorm 包降级到 1.20.1 版本,它解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM