stock

package
v0.0.0-...-3851a7b Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldCode            = "code"
	FieldName            = "name"
	FieldSuspend         = "suspend"
	FieldCreateTimestamp = "create_timestamp"
	FieldModifyTimestamp = "modify_timestamp"
)

Variables

This section is empty.

Functions

func InsertMany

func InsertMany(exec mysql.Exec, stocks []*Model, timeout time.Duration) (int64, error)

func InsertOrUpdateMany

func InsertOrUpdateMany(exec mysql.Exec, stocks []*Model, timeout time.Duration) (int64, error)

func SelectMany

func SelectMany(exec mysql.Exec, codes []string, timeout time.Duration) (map[string]*Model, error)

func UpdateOne

func UpdateOne(exec mysql.Exec, code string, stock *Model, timeout time.Duration) (int64, error)

Types

type Model

type Model struct {
	Code            string       `json:"code"`
	Name            string       `json:"name"`
	Suspend         string       `json:"suspend"`
	CreateTimestamp time.Time    `json:"create_timestamp"`
	ModifyTimestamp sql.NullTime `json:"modify_timestamp"`
}

Model stock

func SelectRange

func SelectRange(exec mysql.Exec, offset, limit int64, timeout time.Duration) ([]*Model, error)

func (*Model) String

func (m *Model) String() string

Jump to

Keyboard shortcuts

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