impl

package
v0.0.0-...-bbd4997 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLStore

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

SQLStore ..

func NewSQLStore

func NewSQLStore(path string) (*SQLStore, error)

NewSQLStore returns an initialized sql store. It takes the db path as its only arugment and returns an error if it cannot connect to the database.

func (SQLStore) GetAllPairs

func (s SQLStore) GetAllPairs(room int64) []domain.InputOutput

GetAllPairs is used for testing to retrieve the pairs for a given room

func (SQLStore) Response

func (s SQLStore) Response(in string, room int64) (domain.InputOutput, float64)

Response gets the available pairs from the database and runs the SoftMatch algorithm returning the found pair and the score of the pair.

func (SQLStore) SaveInputOutput

func (s SQLStore) SaveInputOutput(io domain.InputOutput) error

SaveInputOutput saves the provided input output pair

Jump to

Keyboard shortcuts

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