Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DB ¶
func DB() error
DB calls DBWithName using the current directory name as the database name.
func DBWithName ¶ added in v0.3.2
DBWithName creates a database and login role with the same name and the password 'pass'.
func DumpSchema ¶
func DumpSchema() error
DumpSchema writes the current database schema to "./postgres/schema.sql".
func Generate ¶ added in v0.2.0
func Generate() error
Generate uses sqlc to compile the SQL queries in postgres/queries.sql to Go, adding he default sqlc.yaml file if necessary.
func Migrate ¶
func Migrate() error
Migrate the database to the latest version using the migrations in "./schema".
func SqlcCommand ¶ added in v0.2.0
SqlcCommand returns a command function that runs sqlc in docker with the current working directory mounted.
func TernCommand ¶ added in v0.2.0
SqlcCommand returns a command function that runs tern in docker with host networking and the current working directory mounted.
Types ¶
This section is empty.