database

package
v0.0.0-...-52e4a2a Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBeatmap

func AddBeatmap(beatmap osu.BeatmapData)

func AddFarm

func AddFarm(tx *sql.Tx, row osu.BeatmapData)

func AddRankedMapper

func AddRankedMapper(tx *sql.Tx, row osu.BeatmapData)

func AddStream

func AddStream(tx *sql.Tx, row osu.BeatmapData)

func BatchUpdate

func BatchUpdate(updater Updater)

func Begin

func Begin() (*sql.Tx, error)

func Close

func Close()

func Exec

func Exec(query string, args ...any) (sql.Result, error)

func Exists

func Exists(setId int) bool

func GetBeatmapById

func GetBeatmapById(id int) (osu.BeatmapData, error)

func GetBeatmapBySetId

func GetBeatmapBySetId(setId string) (osu.BeatmapData, error)

func GetBeatmapCount

func GetBeatmapCount() int

func GetBeatmapHashMap

func GetBeatmapHashMap() (map[string]int, error)

func GetBeatmapHashMapV2

func GetBeatmapHashMapV2() (map[string][]int, error)

func GetRowAtOffset

func GetRowAtOffset(offset int) osu.BeatmapData

func OpenFullDb

func OpenFullDb()

func Query

func Query(query string, args ...any) (*sql.Rows, error)

func QueryIds

func QueryIds(query string, values []string) ([]int, []int, map[int]int, []string, error)

func QueryRow

func QueryRow(query string) *sql.Row

func RefreshFarm

func RefreshFarm()

func UpdateRow

func UpdateRow(id int, column string, value string)

Types

type QueryLog

type QueryLog struct {
	Query    string
	Duration string
	Size     int
	Values   []string
}

type Updater

type Updater func(*sql.Tx, osu.BeatmapData)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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