tag_store

package
v0.10.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MysqlTagStore

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

func NewMysqlTagStore

func NewMysqlTagStore(c dbcommon.Config) *MysqlTagStore

func (*MysqlTagStore) Clear

func (m *MysqlTagStore) Clear() error

func (*MysqlTagStore) Delete

func (m *MysqlTagStore) Delete(tag *models.Tag) error

func (*MysqlTagStore) Init

func (m *MysqlTagStore) Init() error

Creates the database and tag table if it doesn't already exist

func (*MysqlTagStore) Insert

func (m *MysqlTagStore) Insert(tag *models.Tag) error

func (*MysqlTagStore) SelectAll

func (m *MysqlTagStore) SelectAll() (models.Tags, error)

func (*MysqlTagStore) SelectByQuery

func (m *MysqlTagStore) SelectByQuery(entityType, entityID string) (models.Tags, error)

type Query

type Query struct {
	EntityID   string
	EntityType string
}

Since query by anything other than EntityID and EntityType requires a mixture of and/or logic (depending on the context) and because the Name field can be any string, any complex queries required outside of entityType or EntityID need to be handled by the caller

type TagStore

type TagStore interface {
	Init() error
	Delete(tag *models.Tag) error
	Insert(tag *models.Tag) error
	SelectAll() (models.Tags, error)
	SelectByQuery(entityType, entityID string) (models.Tags, error)
}

Jump to

Keyboard shortcuts

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