Documentation
¶
Index ¶
- Constants
- func DeleteManyByCodesAndDate(exec mysql.Exec, model string, codes []string, date string, ...) (int64, error)
- func InsertMany(exec mysql.Exec, model string, data []*Model, timeout time.Duration) (int64, error)
- type Model
- func SelectBetweenByCodeAndDate(exec mysql.Exec, model string, code string, begin, end string, ...) ([]*Model, error)
- func SelectManyLatest(exec mysql.Exec, model string, code string, date string, limit int64, ...) ([]*Model, error)
- func SelectOneByCodeAndDate(exec mysql.Exec, model string, code string, date string, timeout time.Duration) (*Model, error)
- func SelectRangeByDate(exec mysql.Exec, model string, date string, offset, limit int64, ...) ([]*Model, error)
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 ¶
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 SelectManyLatest ¶
func SelectOneByCodeAndDate ¶
func SelectRangeByDate ¶
Click to show internal directories.
Click to hide internal directories.