db

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

A DB struct holds the connection to sqlite and provides methods for interacting with persistent storage

func New

func New(db *sqlx.DB) DB

New creates an instance of our repository using the provided connection

func (DB) GetKarmaCount

func (db DB) GetKarmaCount(ctx context.Context, guildID, userID string) (models.KarmaCount, error)

func (DB) GetTopCountsForGuild added in v1.2.0

func (db DB) GetTopCountsForGuild(ctx context.Context, guildID string, top int) ([]models.KarmaCount, error)

func (DB) IncrementCount

func (db DB) IncrementCount(ctx context.Context, guildID, userID string) error

Jump to

Keyboard shortcuts

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