database

package
v0.0.0-...-5a7e91a Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(model interface{}, query string, args ...interface{}) (int, error)

func Create

func Create(model Model) (interface{}, error)

func DropTable

func DropTable(model interface{})

func Exec

func Exec(query string, args ...interface{}) error

func Exists

func Exists(model interface{}) bool

func Find

func Find(model interface{}, query string, args ...interface{}) error

func MustCreateTable

func MustCreateTable(model interface{})

func MustNotExist

func MustNotExist(model interface{})

func One

func One(model interface{}, query string, args ...interface{}) error

func Prepare

func Prepare(query string) (*sqlx.Stmt, error)

func Remove

func Remove(model interface{}) error

func Save

func Save(model Model) (interface{}, error)

func Truncate

func Truncate(model interface{}) error

Types

type Model

type Model interface {
	GetInstance() interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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