dskld5423 2019-02-09 08:22
浏览 277

Goland可以使用其他SQL包自动完成SQL语句吗?

Goland is great at auto-completing SQL statements if I use the sql.DB package functions.

For example, Goland will provide SQL autocompletion (including DDL data) in this setting:

result, err := someDB.Exec(`INSERT INTO <cursor here>`)

Can I configure Goland to show me SQL autocompletion in other contexts? For instance, I'm using github.com/jmoiron/sqlx and it has functions of the form:

err := someDB.Get(&user, `SELECT * FROM users WHERE email="%s"`, email)

In this second example, autocompletion wasn't triggered.

I can't find where/if this is configured in the Goland settings. Can I tell Goland which function parameters should be eligible for SQL autocompletion?

  • 写回答

1条回答 默认 最新

  • dpuwov1487 2019-02-09 09:11
    关注

    You can use Alt + Enter inside the query and then use Inject Language and start typing the SQL dialect that you want to insert.

    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记