posh-providers/sqlc-dev/sqlc
Kevin Franklin Kim 4588a19b45
feat: add schema
2025-04-04 16:44:08 +02:00
..
command.go fix(sqlc-dev/sqlc): import 2025-02-21 11:46:58 +01:00
config_test.go feat: add schema 2025-04-04 16:44:08 +02:00
config.go feat(sqlc-dev/sqlc): add command 2025-02-21 11:44:00 +01:00
config.schema.json feat: add schema 2025-04-04 16:44:08 +02:00
README.md feat(sqlc-dev/sqlc): add command 2025-02-21 11:44:00 +01:00

POSH sqlc provider

Usage

Plugin

package plugin

type Plugin struct {
	l        log.Logger
  cache    cache.Cache
	commands command.Commands
}

func New(l log.Logger) (plugin.Plugin, error) {
	inst := &Plugin{
		l:        l,
		commands: command.Commands{},
	}

	// ...

  inst.commands.MustAdd(sqlc.NewCommand(l, inst.cache))

	// ...

	return inst, nil
}

Config

To install binary locally, add:

sqlc:
  tempDir: .posh/tmp/sqlc
  cacheDirDir: .posh/cache/sqlc

Ownbrew

To install binary locally, add:

ownbrew:
  packages:
    - name: sqlc
      tap: foomo/tap/sqlc-dev/sqlc
      version: 1.28.0