goyesql

Go + Yesql

  • 所有者: nleof/goyesql
  • 平台:
  • 许可证: BSD 2-Clause "Simplified" License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Build Status
GoDoc
Go Report Card

goyesql

Golang + Yesql

Parse a file and associate SQL queries to a map. Useful for separating SQL from code logic.

Installation

$ go get -u github.com/nleof/goyesql

Usage

Create a file containing your SQL queries

-- queries.sql

-- name: list
SELECT *
FROM foo;

-- name: get
SELECT *
FROM foo
WHERE bar = $1;

And just call them in your code!

queries := goyesql.MustParseFile("queries.sql")
// use queries["list"] with sql/database, sqlx ...

Enjoy!

主要指标

概览
名称与所有者nleof/goyesql
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证BSD 2-Clause "Simplified" License
所有者活动
创建于2015-11-02 02:10:55
推送于2023-11-29 18:18:25
最后一次提交2023-11-29 19:18:25
发布数3
最新版本名称v1.0.2 (发布于 )
第一版名称v1.0.0 (发布于 )
用户参与
星数252
关注者数7
派生数10
提交数25
已启用问题?
问题数2
打开的问题数1
拉请求数3
打开的拉请求数0
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?