bigpigeon
V2EX  ›  问与答

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

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