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

huangapple go评论102阅读模式
英文:

Connecting to Oracle database with gorm in golang

问题

之前我使用了godror包来连接Oracle数据库客户端。现在我想在我的系统中实现ORM,并且想使用GORM包来连接Oracle,但是似乎我无法做到。
我找到了一个包https://github.com/CengSin/oracle,但是安装该包似乎失败了。我尝试了以下命令:
go get github.com/cengsin/oracle
我似乎陷入了困境。

英文:

Previously i was using godror package to connect to oracle database client. 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.
I did found out a package https://github.com/CengSin/oracle but the package installation seem to fail. Trying:
go get github.com/cengsin/oracle

I seem to be stuck on this.

答案1

得分: 2

所以,看起来在安装包go get github.com/cengsin/oracle时,gorm包需要的版本小于或等于v1.20.1。我将gorm包降级到了1.20.1版本,问题得到了解决。

英文:

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. I downgraded my gorm package to version 1.20.1 and it solved my issue.

huangapple
  • 本文由 发表于 2022年7月22日 15:03:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/73076349.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定