modelv1

package
v0.0.0-...-3fab713 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersion = "1.0.0"

Variables

This section is empty.

Functions

This section is empty.

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 FlywaySchemaHistory

type FlywaySchemaHistory struct {
	InstalledRank int32
	Version       sql.NullString
	Description   string
	Type          string
	Script        string
	Checksum      sql.NullInt32
	InstalledBy   string
	InstalledOn   time.Time
	ExecutionTime int32
	Success       bool
}

type Hellokv

type Hellokv struct {
	Key   string
	Value sql.NullString
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) Get

func (q *Queries) Get(ctx context.Context, key string) (Hellokv, error)

func (*Queries) GetLatestSchema

func (q *Queries) GetLatestSchema(ctx context.Context) (sql.NullString, error)

func (*Queries) GetSupportedSchemaVersion

func (q *Queries) GetSupportedSchemaVersion() string

func (*Queries) Set

func (q *Queries) Set(ctx context.Context, arg SetParams) (Hellokv, error)

func (*Queries) WithTx

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

type SetParams

type SetParams struct {
	Key   string
	Value sql.NullString
}

Jump to

Keyboard shortcuts

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