modelstore

package
v0.0.0-...-da2e21c Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelStore

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

ModelStore handles model retrieving operation

func NewModelStore

func NewModelStore(db *gorm.DB) *ModelStore

NewModelStore creates and returns a new ModelStore instance

func (*ModelStore) First

func (receiver *ModelStore) First(pathInterface interface{}, queryInterface interface{}) (interface{}, error)

First retrieves the first record under specific conditions from DB

func (*ModelStore) Multi

func (receiver *ModelStore) Multi(pathInterface interface{}, queryInterface interface{}) (interface{}, error)

Multi retrieves multiple record from DB

func (*ModelStore) Single

func (receiver *ModelStore) Single(pathInterface interface{}, queryInterface interface{}) (interface{}, error)

Single retrieves a single record from DB

Jump to

Keyboard shortcuts

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