mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
* chore: Initial database scaffolding This implements migrations and code generation for interfacing with a PostgreSQL database. A dependency is added for the "postgres" binary on the host, but that seems like an acceptable requirement considering it's our primary database. An in-memory database object can be created for simple cross-OS and fast testing. * Run tests in CI * Use Docker instead of binaries on the host * Skip database tests on non-Linux operating systems * chore: Add golangci-lint and codecov * Use consistent file names
18 lines
303 B
Go
18 lines
303 B
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// source: query.sql
|
|
|
|
package database
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
const exampleQuery = `-- name: ExampleQuery :exec
|
|
SELECT 'example query'
|
|
`
|
|
|
|
func (q *sqlQuerier) ExampleQuery(ctx context.Context) error {
|
|
_, err := q.db.ExecContext(ctx, exampleQuery)
|
|
return err
|
|
}
|