Skip to content

Commit 1b5dfe7

Browse files
committed
docs: update README with badges, usage docs, and improve repo metadata
1 parent 779f47b commit 1b5dfe7

2 files changed

Lines changed: 47 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,3 @@ jobs:
3333
uses: golangci/golangci-lint-action@v9
3434
with:
3535
version: latest
36-
- name: Run release-please
37-
uses: googleapis/release-please-action@v4
38-
with:
39-
release-type: go
40-
token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,48 @@
11
# sqlc-gen-queries
2-
A query generation tool that produces sqlc-compatible SQL from your database schema.
2+
3+
[![CI](https://github.com/sqlc-contrib/sqlc-gen-queries/actions/workflows/ci.yml/badge.svg)](https://github.com/sqlc-contrib/sqlc-gen-queries/actions/workflows/ci.yml)
4+
[![Release](https://img.shields.io/github/v/release/sqlc-contrib/sqlc-gen-queries?include_prereleases)](https://github.com/sqlc-contrib/sqlc-gen-queries/releases)
5+
[![License](https://img.shields.io/github/license/sqlc-contrib/sqlc-gen-queries)](LICENSE)
6+
[![Go](https://img.shields.io/badge/Go-1.25-00ADD8?logo=go&logoColor=white)](https://go.dev)
7+
[![sqlc](https://img.shields.io/badge/sqlc-compatible-blue)](https://sqlc.dev)
8+
9+
A CLI tool that generates [sqlc](https://sqlc.dev)-compatible SQL queries from your database schema catalog. Point it at a schema catalog and a configuration file, and it produces ready-to-use query files for sqlc.
10+
11+
## Features
12+
13+
- Generate CRUD queries (`SELECT`, `INSERT`, `UPDATE`, `DELETE`) from a database schema catalog
14+
- Configurable via YAML — control which tables and operations to generate
15+
- Works as a standalone CLI or as part of a CI/CD pipeline
16+
- Supports custom query templates
17+
18+
## Installation
19+
20+
```bash
21+
go install github.com/sqlc-contrib/sqlc-gen-queries/cmd/sqlc-gen-queries@latest
22+
```
23+
24+
## Usage
25+
26+
```bash
27+
sqlc-gen-queries --config-file sqlc.yaml --catalog-file schema.json
28+
```
29+
30+
| Flag | Environment Variable | Default | Description |
31+
|------|---------------------|---------|-------------|
32+
| `--config-file` | `SQLC_CONFIG_FILE` | | Path to the sqlc configuration file |
33+
| `--catalog-file` | `SQLC_CATALOG_FILE` | `schema.json` | Path to the catalog file |
34+
35+
## Contributing
36+
37+
Contributions are welcome! Please open an issue or pull request.
38+
39+
To set up a development environment with [Nix](https://nixos.org):
40+
41+
```bash
42+
nix develop
43+
go test ./...
44+
```
45+
46+
## License
47+
48+
[MIT](LICENSE)

0 commit comments

Comments
 (0)