Members
(static) FILTER_TYPE :String
Properties:
Name | Type | Description |
---|---|---|
EQ |
String | equivalent of sql '=' |
EQ_NOT |
String | equivalent of sql '!=' |
LESS |
String | equivalent of sql '<' |
LESS_EQ |
String | equivalent of sql '<=' |
GREATER |
String | equivalent of sql '>' |
GREATER_EQ |
String | equivalent of sql '>=' |
IN |
String | equivalent of sql 'in()' |
IN_NOT |
String | equivalent of sql 'not in()' |
BETWEEN |
String | equivalent of sql 'between()' |
BETWEEN_NOT |
String | equivalent of sql 'not between()' |
LIKE |
String | equivalent of sql 'like()' |
MAX |
String | equivalent of sql 'max()' |
MIN |
String | equivalent of sql 'min()' |
Type:
- String
(static) FILTER_VALUE :String
Properties:
Name | Type | Description |
---|---|---|
YEAR_ROLLING |
String | |
YEAR_START |
String | |
YEAR_END |
String | |
YEAR_PREV_START |
String | |
YEAR_PREV_END |
String | |
QUARTER_START |
String | |
QUARTER_END |
String | |
QUARTER_PY_START |
String | |
QUARTER_PY_END |
String | |
QUARTER_PREV_START |
String | |
QUARTER_PREV_END |
String | |
MONTH_ROLLING |
String | |
MONTH_START |
String | |
MONTH_END |
String | |
MONTH_PY_START |
String | |
MONTH_PY_END |
String | |
MONTH_PREV_START |
String | |
MONTH_PREV_END |
String | |
WEEK_ROLLING |
String | |
WEEK_START |
String | |
WEEK_END |
String | |
WEEK_PY_START |
String | |
WEEK_PY_END |
String | |
WEEK_PREV_START |
String | |
WEEK_PREV_END |
String | |
TODAY |
String | |
YESTERDAY |
String |
Type:
- String
(static) FILTER_VALUE_HANDLER :String
Properties:
Name | Type | Description |
---|---|---|
YEAR_ROLLING |
function | |
YEAR_START |
function | |
YEAR_END |
function | |
YEAR_PREV_START |
function | |
YEAR_PREV_END |
function | |
QUARTER_START |
function | |
QUARTER_END |
function | |
QUARTER_PY_START |
function | |
QUARTER_PY_END |
function | |
QUARTER_PREV_START |
function | |
QUARTER_PREV_END |
function | |
MONTH_ROLLING |
function | |
MONTH_START |
function | |
MONTH_END |
function | |
MONTH_PY_START |
function | |
MONTH_PY_END |
function | |
MONTH_PREV_START |
function | |
MONTH_PREV_END |
function | |
WEEK_ROLLING |
function | |
WEEK_START |
function | |
WEEK_END |
function | |
WEEK_PY_START |
function | |
WEEK_PY_END |
function | |
WEEK_PREV_START |
function | |
WEEK_PREV_END |
function | |
TODAY |
function | |
YESTERDAY |
function |
Type:
- String
(static) KEY :String
Properties:
Name | Type | Description |
---|---|---|
FIELDS |
String | |
FROM |
String | |
METRICS |
String | |
DIMENSIONS |
String | |
FILTERS |
String | |
SORT |
String |
Type:
- String
(static) METRIC_TYPE :String
Properties:
Name | Type | Description |
---|---|---|
VALUE |
String | no aggregation |
EXPRESSION |
String | sql expression |
AVG |
String | equivalent of sql 'avg()' |
COUNT |
String | equivalent of sql 'count()' |
MAX |
String | equivalent of sql 'max()' |
MIN |
String | equivalent of sql 'min()' |
SUM |
String | equivalent of sql 'sum()' |
GROUP_CONCAT |
String | equivalent of mysql 'group_concat()' |
GROUP_CONCAT_UNIQ |
String | equivalent of mysql 'group_concat(distinct)' |
Type:
- String
(static) SORT_TYPE :String
Properties:
Name | Type | Description |
---|---|---|
ASC |
String | |
DESC |
String |
Type:
- String
Methods
(static) clone(obj) → {Object}
Клонирует json-like obj
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object |
Returns:
- Type
- Object
(static) createDimension(options, dimensionopt)
Создает/мутирует dimension
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options |
DimensionOptions | опции |
||
dimension |
Object |
<optional> |
null
|
dimension для мутации |
(static) createFilter(options, filteropt)
Создает/мутирует filter
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options |
FilterOptions | опции |
||
filter |
Object |
<optional> |
null
|
filter для мутации |
(static) createMetric(options, metricopt)
Создает/мутирует metric
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options |
MetricOptions | опции |
||
metric |
Object |
<optional> |
null
|
metric для мутации |
(static) createQuery(queryopt)
Создает/валидирует query
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
query |
IQuerySchema |
<optional> |
null
|
query для валидации |
(static) createSort(options, sortopt)
Создает/мутирует sort
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options |
SortOptions | опции |
||
sort |
Object |
<optional> |
null
|
sort для мутации |
(static) getDimensionField(dimension) → {String}
Возвращает field dimension
Parameters:
Name | Type | Description |
---|---|---|
dimension |
Object |
Returns:
- Type
- String
(static) getDimensionName(dimension) → {String}
Возвращает имя dimension
Parameters:
Name | Type | Description |
---|---|---|
dimension |
Object |
Returns:
- Type
- String
(static) getFilterName(filter) → {String}
Возвращает имя filter
Parameters:
Name | Type | Description |
---|---|---|
filter |
Object |
Returns:
- Type
- String
(static) getFilterType(filter) → {String}
Возвращает тип filter
Parameters:
Name | Type | Description |
---|---|---|
filter |
Object |
Returns:
- Type
- String
(static) getFilterValue(filter) → {String}
Возвращает value filter
Parameters:
Name | Type | Description |
---|---|---|
filter |
Object |
Returns:
- Type
- String
(static) getMetricField(metric) → {String}
Возвращает field metric
Parameters:
Name | Type | Description |
---|---|---|
metric |
Object |
Returns:
- Type
- String
(static) getMetricName(metric) → {String}
Возвращает имя metric
Parameters:
Name | Type | Description |
---|---|---|
metric |
Object |
Returns:
- Type
- String
(static) getMetricType(metric) → {String}
Возвращает тип metric
Parameters:
Name | Type | Description |
---|---|---|
metric |
Object |
Returns:
- Type
- String
(static) getSortName(sort) → {String}
Возвращает имя sort
Parameters:
Name | Type | Description |
---|---|---|
sort |
Object |
Returns:
- Type
- String
(static) getSortType(sort) → {String}
Возвращает тип sort
Parameters:
Name | Type | Description |
---|---|---|
sort |
Object |
Returns:
- Type
- String
(static) queryDimensionNames(query) → {Array}
Возвращает массив имен dimension в query
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema | query |
Returns:
массив имен dimension
- Type
- Array
(static) queryFieldNames(query) → {Array}
Возвращает массив имен field
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema | query |
Returns:
массив имен field
- Type
- Array
(static) queryGetDimensionField(query, name) → {String}
Возвращает field name dimension
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema | query |
name |
String | dimension name |
Returns:
field name или null если dimension нет
- Type
- String
(static) queryInsertUpdateDimension(query, dimension) → {IQuerySchema}
Добавляет/заменяет dimension в query
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema | query |
dimension |
Object | dimension |
Returns:
- Type
- IQuerySchema
(static) queryInsertUpdateFilter(query, filter) → {IQuerySchema}
Добавляет/заменяет filter в query
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema | query |
filter |
Object | filter |
Returns:
- Type
- IQuerySchema
(static) queryMetricNames(query) → {Array}
Возвращает массив имен metric в query
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema | query |
Returns:
массив имен metric
- Type
- Array
(static) queryRemoveAllFilters(query) → {IQuerySchema}
Удаляет все filter из query
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema | query |
Returns:
- Type
- IQuerySchema
(static) queryRemoveFilter(query, name) → {IQuerySchema}
Удаляет filter из query
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema | query |
name |
String | название metric/dimension |
Returns:
- Type
- IQuerySchema
(static) queryReplaceAllFilterValues(query) → {IQuerySchema}
Заменяет Query.FILTER_VALUE value всех фильтров
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema |
Returns:
- Type
- IQuerySchema
(static) validateDimension(dimension) → {Boolean}
Валидирует dimension
Parameters:
Name | Type | Description |
---|---|---|
dimension |
Object |
Returns:
- Type
- Boolean
(static) validateFilter(filter) → {Boolean}
Валидирует filter
Parameters:
Name | Type | Description |
---|---|---|
filter |
Object |
Returns:
- Type
- Boolean
(static) validateFrom(query) → {Boolean}
Валидирует from
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema |
Returns:
- Type
- Boolean
(static) validateMetric(metric) → {Boolean}
Валидирует metric
Parameters:
Name | Type | Description |
---|---|---|
metric |
Object |
Returns:
- Type
- Boolean
(static) validateQuery(query) → {Boolean}
Валидирует query
Parameters:
Name | Type | Description |
---|---|---|
query |
IQuerySchema |
Returns:
- Type
- Boolean
(static) validateSort(sort) → {Boolean}
Валидирует sort
Parameters:
Name | Type | Description |
---|---|---|
sort |
Object |
Returns:
- Type
- Boolean
buildQuery() → {IQuerySchema}
Формирует query с текущим state всех активных dimension
Returns:
query
- Type
- IQuerySchema
dimensionStateExists(dimensionName) → {Boolean}
Проверяет, сущ. ли state для dimensionName
Parameters:
Name | Type | Description |
---|---|---|
dimensionName |
String | название dimension |
Returns:
- Type
- Boolean
dimensionStateGoNext(dimensionName, filterValue, filterType) → {Boolean}
Сдвигает тек. dimension state на шаг вперед
Parameters:
Name | Type | Description |
---|---|---|
dimensionName |
String | название dimension |
filterValue |
Array | значения filter |
filterType |
String | тип filter |
Returns:
true если удалось; false нет
- Type
- Boolean
dimensionStateGoPrev(dimensionName) → {Boolean}
Сдвигает тек. dimension state на шаг назад
Parameters:
Name | Type | Description |
---|---|---|
dimensionName |
String | название dimension |
Returns:
true если удалось; false нет
- Type
- Boolean
dimensionStateIsFirst(dimensionName) → {Boolean}
Возвращает true, если dimension state первый
Parameters:
Name | Type | Description |
---|---|---|
dimensionName |
String | название dimension |
Returns:
- Type
- Boolean
dimensionStateIsLast(dimensionName) → {Boolean}
Возвращает true, если dimension state последний
Parameters:
Name | Type | Description |
---|---|---|
dimensionName |
String | название dimension |
Returns:
- Type
- Boolean
enableDimensions(names)
Активирует dimension из списка dimensionList
Parameters:
Name | Type | Description |
---|---|---|
names |
Array | массив названий dimension |