levels

package
v0.0.0-...-651d898 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateLevelParams

type CreateLevelParams struct {
	LevelID    string         `db:"level_id"`
	LevelIndex sql.NullString `db:"level_index"`
	LevelName  sql.NullString `db:"level_name"`
}

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 Level

type Level struct {
	LevelID    string         `csv:"level_id"`
	LevelIndex sql.NullString `csv:"level_index,omitempty"`
	LevelName  sql.NullString `csv:"level_name,omitempty"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) CreateLevel

func (q *Queries) CreateLevel(ctx context.Context, arg CreateLevelParams) error

func (*Queries) GetLevelByID

func (q *Queries) GetLevelByID(ctx context.Context, levelID string) (Level, 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