database

package
v0.0.0-...-bc1fa02 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func (*Database) CloseDatabase

func (d *Database) CloseDatabase()

func (*Database) GetAllNumbers

func (d *Database) GetAllNumbers() (map[string]NumberTable, error)

func (*Database) GetNumber

func (d *Database) GetNumber(number int) (*NumberTable, error)

func (*Database) UpdateStatistics

func (d *Database) UpdateStatistics(number NumberTable) error

type NumberTable

type NumberTable struct {
	Number     string `gorm:"column:number;primary_key"`
	Word       string `gorm:"column:word;size:20"`
	Correct    int    `gorm:"column:correct;"`
	HasChanged bool   `gorm:"-"` // ignore this field
}

func (*NumberTable) TableName

func (n *NumberTable) TableName() string

Jump to

Keyboard shortcuts

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