db

package
v0.111.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateTablesQuery string

Functions

func KnownKeys added in v0.83.0

func KnownKeys() []string

KnownKeys returns the known keys (`name` column) for the `metadata` table.

This must stay aligned with the values in the `schema.sql`

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type Metadatum

type Metadatum struct {
	Name  string
	Value string
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) RetrieveAll added in v0.83.0

func (q *Queries) RetrieveAll(ctx context.Context) ([]Metadatum, error)

func (*Queries) RetrieveCompatibleSince added in v0.91.0

func (q *Queries) RetrieveCompatibleSince(ctx context.Context) (Metadatum, error)

func (*Queries) RetrieveDMDVersion

func (q *Queries) RetrieveDMDVersion(ctx context.Context) (Metadatum, error)

func (*Queries) RetrieveFinalisedAt added in v0.83.0

func (q *Queries) RetrieveFinalisedAt(ctx context.Context) (Metadatum, error)

func (*Queries) SetCompatibleSince added in v0.91.0

func (q *Queries) SetCompatibleSince(ctx context.Context, value string) error

func (*Queries) SetDMDVersion

func (q *Queries) SetDMDVersion(ctx context.Context, value string) error

func (*Queries) SetFinalisedAt added in v0.83.0

func (q *Queries) SetFinalisedAt(ctx context.Context, value string) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

Jump to

Keyboard shortcuts

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