data

package
v0.0.0-...-821bd5c Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: Apache-2.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 NewDatabase

func NewDatabase(path string) (*Database, error)

func (*Database) Close

func (d *Database) Close()

func (*Database) HeadWord

func (d *Database) HeadWord() (string, error)

func (*Database) MaxPos

func (d *Database) MaxPos() (_ int, e error)

func (*Database) MaxScore

func (d *Database) MaxScore() (_ int, e error)

func (*Database) MoveWord

func (d *Database) MoveWord(word string, dest int) (e error)

func (*Database) Populate

func (d *Database) Populate(focus string, words []string) (e error)

func (*Database) SetFocus

func (d *Database) SetFocus(tx *sql.Tx, focus string) (e error)

func (*Database) UpdateScoreAndPos

func (d *Database) UpdateScoreAndPos(word string, score, dest int) (e error)

func (*Database) WordAt

func (d *Database) WordAt(pos int) (_ string, e error)

func (*Database) WordPos

func (d *Database) WordPos(word string) (_ int, e error)

func (*Database) WordScore

func (d *Database) WordScore(word string) (_ int, e error)

type ErrNotFound

type ErrNotFound error

Jump to

Keyboard shortcuts

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