Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SeriesDB ¶
func NewSeriesDB ¶
func (*SeriesDB) BuildScope ¶
func (*SeriesDB) TimeSeries ¶
func (sdb *SeriesDB) TimeSeries(series SeriesRange, args ...interface{}) *gorm.DB
args:
- No args .... default value: date_trunc('{time_unit}', created_at) = day
- Simple On Clause ex 'day = created_at'
type SeriesRange ¶
type SeriesRange interface { StartDate() string EndDate() string StepInterval() string StepName() string DefaultJoinCond() string }
var ( DaysYear SeriesRange = new(daysYear) MonthsYear SeriesRange = new(monthsYear) )
Click to show internal directories.
Click to hide internal directories.