simon888888
V2EX  ›  问与答

迫于迫于 求大伙们推荐一波 go 的 orm

  •  
  •   simon888888 · Mar 25, 2020 · 2765 views
    This topic created in 2267 days ago, the information mentioned may be changed or developed.

    前一个项目使用了 gorm,我发现有时候写的代码奇奇怪怪,没有以前 PHP 的 Eloquent ORM 好用,有没有除了 gorm 之外的其他 orm

    9 replies    2020-03-27 00:40:15 +08:00
    leafx
        1
    leafx  
       Mar 25, 2020 via Android   ❤️ 1
    我就是因为 gorm 被劝退了,顺便一提,开始别人喷 err!=nil 觉得有点矫情,写多了发现是真的恶心
    clayyj1210
        2
    clayyj1210  
       Mar 25, 2020
    @leafx 写多了是真的恶心
    waising
        3
    waising  
       Mar 25, 2020 via iPhone
    没用 orm 就用了 sqlx
    bigpigeon
        4
    bigpigeon  
       Mar 25, 2020
    @leafx err != nil 是 go 语言的问题吧,你用 go 处理错误就避免不了
    leafx
        5
    leafx  
       Mar 25, 2020 via Android
    @bigpigeon 对,所以被劝退了
    scnace
        6
    scnace  
       Mar 25, 2020 via Android
    sqlx +好用的 sqlbuilder 天下第一(最近 facebook 的 ent 挺火的 靠自动生成 业务的大多数代码确实是可以抽象出生成模板的)
    simon888888
        7
    simon888888  
    OP
       Mar 25, 2020
    @leafx gorm 查不到数据貌似他也会走到 err 去
    QingXuJiaZhi
        8
    QingXuJiaZhi  
       Mar 26, 2020
    @simon888888 这个 https://upper.io/db.v3/ 非常好用!自从发现了这个,我再也不用 gorm 了。
    simon888888
        9
    simon888888  
    OP
       Mar 27, 2020
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1136 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 18:18 · PVG 02:18 · LAX 11:18 · JFK 14:18
    ♥ Do have faith in what you're doing.