bigpigeon
V2EX  ›  问与答

go 用 github.com/lib/pq driver 对数据库插入数据无报错,但插入失败

  •  
  •   bigpigeon · Mar 29, 2018 · 2257 views
    This topic created in 3164 days ago, the information mentioned may be changed or developed.
    有人遇到过相同的问题吗?
    这个 driver 是真的坑,不支持'?'占位符,原因是作者怕注入式攻击
    真特么傻逼,但没什么别的选
    而且 postgres 和其他数据库不同,LastInsertID 还需要自己用 QueryRow 实现
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2924 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 05:15 · PVG 13:15 · LAX 21:15 · JFK 00:15
    ♥ Do have faith in what you're doing.