Documentation ¶
Index ¶
- Constants
- Variables
- func QuoteWithDeleteManyByCodesAndDate(exec mysql.Exec, model string, codes []string, date string, ...) (int64, error)
- func QuoteWithInsertMany(exec mysql.Exec, model string, data []*Quote, timeout time.Duration) (int64, error)
- func StockWithInsertMany(exec mysql.Exec, stocks []*Stock, timeout time.Duration) (int64, error)
- func StockWithInsertOrUpdateMany(exec mysql.Exec, stocks []*Stock, timeout time.Duration) (int64, error)
- func StockWithSelectMany(exec mysql.Exec, codes []string, timeout time.Duration) (map[string]*Stock, error)
- func StockWithUpdateOne(exec mysql.Exec, code string, stock *Stock, timeout time.Duration) (int64, error)
- func TaskWithInsertOne(exec mysql.Exec, task *Task, timeout time.Duration) (int64, error)
- func TaskWithUpdateOne(exec mysql.Exec, date string, task *Task, timeout time.Duration) (int64, error)
- type Quote
- func QuoteWithSelectBetweenByCodeAndDate(exec mysql.Exec, model string, code string, begin, end string, ...) ([]*Quote, error)
- func QuoteWithSelectManyLatest(exec mysql.Exec, model string, code string, date string, limit int64, ...) ([]*Quote, error)
- func QuoteWithSelectOneByCodeAndDate(exec mysql.Exec, model string, code string, date string, timeout time.Duration) (*Quote, error)
- func QuoteWithSelectRangeByDate(exec mysql.Exec, model string, date string, offset, limit int64, ...) ([]*Quote, error)
- type Stock
- type Task
Constants ¶
View Source
const ( Day = "day" Week = "week" )
View Source
const ( FieldQuoteID = "id" FieldQuoteCode = "code" FieldQuoteOpen = "open" FieldQuoteClose = "close" FieldQuoteHigh = "high" FieldQuoteLow = "low" FieldQuoteYesterdayClosed = "yesterday_closed" FieldQuoteVolume = "volume" FieldQuoteAccount = "account" FieldQuoteDate = "date" FieldQuoteNumOfYear = "num_of_year" FieldQuoteXd = "xd" FieldQuoteCreateTimestamp = "create_timestamp" FieldQuoteModifyTimestamp = "modify_timestamp" )
View Source
const ( FieldStockCode = "code" FieldStockName = "name" FieldStockSuspend = "suspend" FieldStockCreateTimestamp = "create_timestamp" FieldStockModifyTimestamp = "modify_timestamp" )
View Source
const ( FieldTaskDate = "date" FieldTaskCompleted = "completed" FieldTaskMetadataCount = "metadata_count" FieldTaskStockCount = "stock_count" FieldTaskDayCount = "day_count" FieldTaskWeekCount = "week_count" FieldTaskCallBackURL = "callback_url" FieldTaskCreateTimestamp = "create_timestamp" FieldTaskModifyTimestamp = "modify_timestamp" )
Variables ¶
Functions ¶
func QuoteWithInsertMany ¶
func StockWithInsertMany ¶
func StockWithSelectMany ¶
func StockWithUpdateOne ¶
func TaskWithInsertOne ¶
Types ¶
type Quote ¶
type Quote 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 uint64 `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"` }
type Stock ¶
type Stock 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"` }
Stock
func StockWithSelectRange ¶
type Task ¶
type Task struct { Date string `json:"date"` Completed int8 `json:"completed"` MetadataCount int64 `json:"metadata_count"` StockCount int64 `json:"stock_count"` DayCount int64 `json:"day_count"` WeekCount int64 `json:"week_count"` CallbackURL string `json:"callback_url"` CreateTimestamp time.Time `json:"create_timestamp"` ModifyTimestamp sql.NullTime `json:"modify_timestamp"` }
Task
func TaskWithSelectOne ¶
Click to show internal directories.
Click to hide internal directories.