Versions in this module Expand all Collapse all v1 v1.0.0 Nov 3, 2022 Changes in this version + type ArithmeticCol struct + Alias string + Column []Column + Type ColumnType + func (col *ArithmeticCol) GetAlias() string + func (col *ArithmeticCol) GetExpression() string + type ArithmeticOperatorType string + const ArithmeticOperatorTypeAdd + const ArithmeticOperatorTypeAs + const ArithmeticOperatorTypeDivide + const ArithmeticOperatorTypeMultiply + const ArithmeticOperatorTypeSubtract + type Clause interface + BuildDB func(tx *gorm.DB) (*gorm.DB, error) + BuildSQL func(tx *gorm.DB) (string, error) + GetDBType func() DBType + GetDataset func() string + type Column interface + GetAlias func() string + GetExpression func() string + type ColumnType string + const ColumnTypeAdd + const ColumnTypeAs + const ColumnTypeCount + const ColumnTypeDistinctCount + const ColumnTypeDivide + const ColumnTypeMultiply + const ColumnTypeSubtract + const ColumnTypeSum + const ColumnTypeValue + type DBType = string + const DBTypeClickHouse + const DBTypeMySQL + const DBTypePostgre + const DBTypeSQLite + type DataSource struct + AliasName string + Clause Clause + Database string + Name string + Type DataSourceType + func (d *DataSource) Alias() (string, error) + func (d *DataSource) Expression() (string, error) + func (d *DataSource) Init(tx *gorm.DB) (err error) + func (d *DataSource) Statement() (string, error) + type DataSourceType string + const DataSourceTypeDimension + const DataSourceTypeFact + const DataSourceTypeFactDimensionJoin + const DataSourceTypeMergeJoin + type Dimension struct + Dependency []*Dimension + FieldName string + Name string + Table string + Type DimensionType + ValueType ValueType + func (d *Dimension) Alias() (string, error) + func (d *Dimension) Expression() (string, error) + func (d *Dimension) Statement() (string, error) + type DimensionType string + const DimensionTypeCase + const DimensionTypeExpression + const DimensionTypeMulti + const DimensionTypeSingle + const DimensionTypeValue + type ExpressionCol struct + Alias string + Expression string + func (col *ExpressionCol) GetAlias() string + func (col *ExpressionCol) GetExpression() string + type FieldProperty string + const FieldPropertyDimension + const FieldPropertyMetric + type Filter struct + Children []*Filter + FieldProperty FieldProperty + Name string + OperatorType FilterOperatorType + Table string + Value []any + ValueType ValueType + func (f *Filter) Alias() (string, error) + func (f *Filter) Expression() (string, error) + func (f *Filter) Statement() (string, error) + type FilterOperatorType string + const FilterOperatorTypeAnd + const FilterOperatorTypeEquals + const FilterOperatorTypeExpression + const FilterOperatorTypeGreater + const FilterOperatorTypeGreaterEquals + const FilterOperatorTypeHas + const FilterOperatorTypeIn + const FilterOperatorTypeLess + const FilterOperatorTypeLessEquals + const FilterOperatorTypeLike + const FilterOperatorTypeNotIn + const FilterOperatorTypeOr + const FilterOperatorTypeUnknown + func (f FilterOperatorType) IsTree() bool + type Join struct + DataSource1 *DataSource + DataSource2 *DataSource + Filters []*Filter + JoinType string + On []*JoinOn + func (j *Join) GetJoinType() string + type JoinOn struct + Key1 string + Key2 string + type Limit struct + Limit uint64 + Offset uint64 + type Metric struct + Children []*Metric + DBType DBType + FieldName string + Filter *Filter + Name string + Table string + Type MetricType + ValueType ValueType + func (m *Metric) Alias() (string, error) + func (m *Metric) Expression() (string, error) + func (m *Metric) Statement() (string, error) + type MetricType string + const MetricTypeAdd + const MetricTypeAs + const MetricTypeCount + const MetricTypeDistinctCount + const MetricTypeDivide + const MetricTypeExpression + const MetricTypeMultiply + const MetricTypeSubtract + const MetricTypeSum + const MetricTypeUnknown + const MetricTypeValue + type NormalClause struct + DataSource []*DataSource + Dimensions []*Dimension + Filters []*Filter + Joins []*Join + Limit *Limit + Metrics []*Metric + Orders []*OrderBy + func (b *NormalClause) GetDBType() DBType + func (b *NormalClause) GetDataset() string + func (n *NormalClause) BuildDB(tx *gorm.DB) (*gorm.DB, error) + func (n *NormalClause) BuildSQL(tx *gorm.DB) (string, error) + type OrderBy struct + Direction OrderDirectionType + FieldProperty FieldProperty + Name string + Table string + func (o *OrderBy) Alias() (string, error) + func (o *OrderBy) Expression() (string, error) + func (o *OrderBy) Statement() (string, error) + type OrderDirectionType string + const OrderDirectionTypeAscending + const OrderDirectionTypeDescending + const OrderDirectionTypeUnknown + type Query struct + DataSetName string + Dimensions []string + Filters []*Filter + Limit *Limit + Metrics []string + Orders []*OrderBy + Sql string + TimeInterval *TimeInterval + func (q *Query) TranslateTimeIntervalToFilter() + type Result struct + Dimensions []string + Source []map[string]any + func (r *Result) AddSource(in map[string]any) error + func (r *Result) SetDimensions(query *Query) + type SingleCol struct + Alias string + DBType DBType + Filter *Filter + Name string + Table string + Type ColumnType + func (col *SingleCol) GetAlias() string + func (col *SingleCol) GetExpression() string + func (col *SingleCol) GetIfExpression() (string, error) + type SqlClause struct + Sql string + func (b *SqlClause) GetDBType() DBType + func (b *SqlClause) GetDataset() string + func (s *SqlClause) BuildDB(tx *gorm.DB) (*gorm.DB, error) + func (s *SqlClause) BuildSQL(*gorm.DB) (string, error) + type Statement interface + Alias func() (string, error) + Expression func() (string, error) + Statement func() (string, error) + type TimeInterval struct + End string + Name string + Start string + func (t *TimeInterval) ToFilter() *Filter + type ValueType string + const ValueTypeFloat + const ValueTypeInteger + const ValueTypeString + const ValueTypeUnknown