sqlc-addon

command module
v1.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

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 ?

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

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 :

sqlc-addon generate

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL