quote

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Day  = "day"
	Week = "week"
)
View Source
const (
	FieldID              = "id"
	FieldCode            = "code"
	FieldOpen            = "open"
	FieldClose           = "close"
	FieldHigh            = "high"
	FieldLow             = "low"
	FieldYesterdayClosed = "yesterday_closed"
	FieldVolume          = "volume"
	FieldAccount         = "account"
	FieldDate            = "date"
	FieldNumOfYear       = "num_of_year"
	FieldXd              = "xd"
	FieldCreateTimestamp = "create_timestamp"
	FieldModifyTimestamp = "modify_timestamp"
)

Variables

This section is empty.

Functions

func DeleteManyByCodesAndDate

func DeleteManyByCodesAndDate(exec mysql.Exec, model string, codes []string, date string, timeout time.Duration) (int64, error)

func InsertMany

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

Types

type Model

type Model struct {
	Id              int64        `json:"id"`
	Code            string       `json:"code"`
	Open            float64      `json:"open"`
	Close           float64      `json:"close"`
	High            float64      `json:"high"`
	Low             float64      `json:"low"`
	YesterdayClosed float64      `json:"yesterday_closed"`
	Volume          int64        `json:"volume"`
	Account         float64      `json:"account"`
	Date            time.Time    `json:"date"`
	NumOfYear       int          `json:"num_of_year"`
	Xd              float64      `json:"xd"`
	CreateTimestamp time.Time    `json:"create_timestamp"`
	ModifyTimestamp sql.NullTime `json:"modify_timestamp"`
}

func SelectBetweenByCodeAndDate

func SelectBetweenByCodeAndDate(exec mysql.Exec, model string, code string, begin, end string, timeout time.Duration) ([]*Model, error)

func SelectManyLatest

func SelectManyLatest(exec mysql.Exec, model string, code string, date string, limit int64, timeout time.Duration) ([]*Model, error)

func SelectOneByCodeAndDate

func SelectOneByCodeAndDate(exec mysql.Exec, model string, code string, date string, timeout time.Duration) (*Model, error)

func SelectRangeByDate

func SelectRangeByDate(exec mysql.Exec, model string, date string, 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