https://github.com/michaelcoll/sqlc-addon
A sqlc addon CLI that adds more code
https://github.com/michaelcoll/sqlc-addon
golang sqlc
Last synced: 6 months ago
JSON representation
A sqlc addon CLI that adds more code
- Host: GitHub
- URL: https://github.com/michaelcoll/sqlc-addon
- Owner: michaelcoll
- License: apache-2.0
- Created: 2023-05-08T20:31:01.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-12-04T06:06:59.000Z (7 months ago)
- Last Synced: 2025-12-07T12:41:23.820Z (7 months ago)
- Topics: golang, sqlc
- Language: Go
- Homepage:
- Size: 127 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# sqlc-addon
A sqlc addon CLI that adds more code
## Supported Database
- SQLite
## What's done ?
This CLI will generate two new files :
- `connect.go` used to connect to the database
- `migration.go` used to initialize the database using the schema request that sqlc use
## How to install ?
```shell
go install github.com/michaelcoll/sqlc-addon@latest
```
## How to use ?
Place a new config file called `sqlc-addon.yaml` next to the sqlc config file.
The file should look like this
```yaml
version: "1"
addon_out: "internal/back/infrastructure/db"
database_name: "data.db"
```
Call the command in the same folder as the file `sqlc-addon.yaml` :
```shell
sqlc-addon generate
```