database

package
v0.0.0-...-e209675 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 Querier

type Querier interface {
	GetPageViews(ctx context.Context) (int32, error)
	IncrementPageViews(ctx context.Context) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetPageViews

func (q *Queries) GetPageViews(ctx context.Context) (int32, error)

func (*Queries) IncrementPageViews

func (q *Queries) IncrementPageViews(ctx context.Context) error

func (*Queries) WithTx

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

type Stat

type Stat struct {
	PageViews int32
}

Jump to

Keyboard shortcuts

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