英文:
ORM / ORM-like lib in Go
问题
我正在使用一个具有许多表的传统 MySQL 数据库,并打算使用 ACL 在一些权限控制下将其作为 REST API 服务器公开。该服务器将使用 Go 语言以获得更好的并发支持。
那么,有没有一个支持检查传统 MySQL 数据库并生成模型代码的 Go ORM 库,我可以从中开始?
或者是否有其他方法可以实现相同的目标?
英文:
I'm working with a legacy Mysql DB with a lot of tables, and about to expose it as an REST api server under some privilege control using ACL. The server would be using Go for better concurrency support.
So is there a Go ORM library that supports inspecting legacy MySQLDB and generating model code that I can start with?
Or is there any other method to achieve same goal?
答案1
得分: 8
以下是今天存在的列表:
- https://github.com/gosexy/db
- https://github.com/eaigner/jet
- https://github.com/eaigner/hood
- https://github.com/coocood/qbs(从hood分叉)
- https://github.com/astaxie/beedb
- https://github.com/coopernurse/gorp
- https://github.com/jmoiron/modl(gorp的分叉)
- https://github.com/go-xorm/xorm
对于你的特定情况:hood允许自动生成模式。
英文:
The following list exists today:
- https://github.com/gosexy/db
- https://github.com/eaigner/jet
- https://github.com/eaigner/hood
- https://github.com/coocood/qbs (forked from hood)
- https://github.com/astaxie/beedb
- https://github.com/coopernurse/gorp
- https://github.com/jmoiron/modl (fork of gorp)
- https://github.com/go-xorm/xorm
For your particular case: hood allows automatic schema generation
答案2
得分: 3
请看 https://github.com/jinzhu/gorm
一个非常酷的 ORM,旨在为开发者提供友好的编程体验,由我编写
英文:
Have a look at https://github.com/jinzhu/gorm
A really cool ORM aims to be developer friendly written by me
答案3
得分: 1
这个链接是一个GitHub仓库,它可以从MySQL数据库生成结构体代码。
英文:
https://github.com/asdf072/struct-create
This can generate struct code from MySQLDB
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论