db

package
v0.0.0-...-ae2462d Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

package db contains database methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Items

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

Items is a sqlite3 database for items.

func NewItems

func NewItems(dataSourcePath string) (*Items, error)

NewItems returns an Items database from the given dataSourcePath. It returns an error if the path doesnt exist or there was a problem with loading the database.

func (*Items) LoadItemsBySearchTerm

func (i *Items) LoadItemsBySearchTerm(searchTerm string) ([]*model.Item, error)

LoadItemsBySearchTerm loads items that have the given search term in its item name. If the given search term contains multiple words an item that has any of the words in its name will be loaded.

Jump to

Keyboard shortcuts

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