sql

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

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

Go to latest
Published: Feb 12, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(s SQL) (interface{}, error)

func Delete

func Delete(s SQL) error

func List

func List(s SQL) (interface{}, error)

func Read

func Read(s SQL) (interface{}, error)

func Update

func Update(s SQL) error

Types

type Company

type Company struct {
	Data interface{}
	Stmt map[string]string
}

func NewCompany

func NewCompany(payload interface{}) *Company

func (*Company) Create

func (s *Company) Create(db *mysql.DB) (interface{}, error)

func (*Company) Delete

func (s *Company) Delete(db *mysql.DB) error

func (*Company) List

func (s *Company) List(db *mysql.DB) (interface{}, error)

func (*Company) Read

func (s *Company) Read(db *mysql.DB) (interface{}, error)

func (*Company) Update

func (s *Company) Update(db *mysql.DB) error

type Entry

type Entry struct {
	Data interface{}
	Stmt map[string]string
}

func NewEntry

func NewEntry(payload interface{}) *Entry

func (*Entry) Create

func (s *Entry) Create(db *mysql.DB) (interface{}, error)

func (*Entry) Delete

func (s *Entry) Delete(db *mysql.DB) error

func (*Entry) List

func (s *Entry) List(db *mysql.DB) (interface{}, error)

func (*Entry) Read

func (s *Entry) Read(db *mysql.DB) (interface{}, error)

func (*Entry) Update

func (s *Entry) Update(db *mysql.DB) error

type Invoice

type Invoice struct {
	Data interface{}
	Stmt map[string]string
}

func NewInvoice

func NewInvoice(payload interface{}) *Invoice

func (*Invoice) Create

func (s *Invoice) Create(db *mysql.DB) (interface{}, error)

func (*Invoice) Delete

func (s *Invoice) Delete(db *mysql.DB) error

func (*Invoice) GetTotalHours

func (s *Invoice) GetTotalHours(db *mysql.DB, invoice_id int) (float64, error)

func (*Invoice) List

func (s *Invoice) List(db *mysql.DB) (interface{}, error)

func (*Invoice) Read

func (s *Invoice) Read(db *mysql.DB) (interface{}, error)

func (*Invoice) Update

func (s *Invoice) Update(db *mysql.DB) error

type SQL

type SQL interface {
	Create(db *mysql.DB) (interface{}, error)
	Read(db *mysql.DB) (interface{}, error)
	Update(db *mysql.DB) error
	Delete(db *mysql.DB) error
	List(db *mysql.DB) (interface{}, error)
}

Jump to

Keyboard shortcuts

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