@vizzly/semantic-layer-public 0.0.107 → 0.0.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,6 +88,22 @@ exports.timeDimensionsConstants = {
88
88
  publicName: 'Daily',
89
89
  dateFormat: 'DD-MM-YYYY',
90
90
  },
91
+ hourOfDayOnly: {
92
+ publicName: 'Hour of day',
93
+ dateFormat: 'hour_of_day',
94
+ },
95
+ weekOfYearOnly: {
96
+ publicName: 'Week of year',
97
+ dateFormat: 'week_of_year',
98
+ },
99
+ dayOfWeekOnly: {
100
+ publicName: 'Day of week',
101
+ dateFormat: 'day_of_week_iso',
102
+ },
103
+ dayOfMonthOnly: {
104
+ publicName: 'Day of month',
105
+ dateFormat: 'day_of_month',
106
+ },
91
107
  second: {
92
108
  publicName: 'Per second',
93
109
  dateFormat: 'hh:mm:ss',
@@ -2,47 +2,51 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.queryEngineConfig = void 0;
4
4
  const support_1 = require("./support");
5
- const queryEngineConfig = () => ({
6
- origin: 'query-engine',
7
- supportedFeatures: [
8
- 'simpleMaths',
9
- 'aggregateMaths',
10
- 'subquery',
11
- 'configManagerUi',
12
- 'switchField',
13
- 'roundedNumbers',
14
- 'sqlDefinedDataSet',
15
- 'encryptedDashboards',
16
- 'sqlViews',
17
- 'dateMaths',
18
- ],
19
- supportedTimeTruncFunctions: (0, support_1.supportedTimeTruncFunctions)([
20
- 'month',
21
- 'year',
22
- 'quarter',
23
- 'week',
24
- 'day',
25
- 'hour',
26
- 'minute',
27
- 'second',
28
- ]),
29
- supportedAggregates: (0, support_1.supportedAggregates)(['sum', 'mean', 'min', 'max', 'count', 'countDistinct']),
30
- supportedOperators: (0, support_1.supportedOperators)([
31
- '>',
32
- '<',
33
- '=',
34
- '!=',
35
- '>=',
36
- '<=',
37
- 'is_one_of',
38
- 'is_not_one_of',
39
- 'starts_with',
40
- 'ends_with',
41
- 'contains_substring',
42
- 'does_not_contain_substring',
43
- 'array_contains',
44
- 'array_does_not_contain',
45
- ]),
46
- supportedTransformationFunctions: (0, support_1.supportedTransformationFunctions)(['round_to_0_dp', 'round_to_2_dp']),
47
- });
5
+ const sqldialects_1 = require("@vizzly/sqldialects");
6
+ const queryEngineConfig = () => {
7
+ const dialect = (0, sqldialects_1.getDialect)({ type: 'microsoftSQLServer' });
8
+ return {
9
+ origin: 'query-engine',
10
+ supportedFeatures: [
11
+ 'simpleMaths',
12
+ 'aggregateMaths',
13
+ 'subquery',
14
+ 'configManagerUi',
15
+ 'switchField',
16
+ 'roundedNumbers',
17
+ 'sqlDefinedDataSet',
18
+ 'encryptedDashboards',
19
+ 'sqlViews',
20
+ 'dateMaths',
21
+ ],
22
+ supportedTimeTruncFunctions: (0, support_1.supportedTimeTruncFunctions)([
23
+ 'month',
24
+ 'year',
25
+ 'quarter',
26
+ 'week',
27
+ 'day',
28
+ 'hour',
29
+ 'minute',
30
+ ...(dialect.context.flavour === 'kusto' ? [] : ['second']),
31
+ ]),
32
+ supportedAggregates: (0, support_1.supportedAggregates)(['sum', 'mean', 'min', 'max', 'count', 'countDistinct']),
33
+ supportedOperators: (0, support_1.supportedOperators)([
34
+ '>',
35
+ '<',
36
+ '=',
37
+ '!=',
38
+ '>=',
39
+ '<=',
40
+ 'is_one_of',
41
+ 'is_not_one_of',
42
+ 'starts_with',
43
+ 'ends_with',
44
+ 'contains_substring',
45
+ 'does_not_contain_substring',
46
+ 'array_contains',
47
+ 'array_does_not_contain',
48
+ ]),
49
+ supportedTransformationFunctions: (0, support_1.supportedTransformationFunctions)(['round_to_0_dp', 'round_to_2_dp']),
50
+ };
51
+ };
48
52
  exports.queryEngineConfig = queryEngineConfig;
@@ -25,6 +25,9 @@ const queryEngineConfig = () => ({
25
25
  'hour',
26
26
  'minute',
27
27
  'second',
28
+ 'dayOfMonthOnly',
29
+ 'dayOfWeekOnly',
30
+ 'weekOfYearOnly',
28
31
  ]),
29
32
  supportedAggregates: (0, support_1.supportedAggregates)([
30
33
  'sum',
@@ -25,6 +25,10 @@ const queryEngineConfig = () => ({
25
25
  'hour',
26
26
  'minute',
27
27
  'second',
28
+ 'dayOfMonthOnly',
29
+ 'dayOfWeekOnly',
30
+ 'weekOfYearOnly',
31
+ 'hourOfDayOnly',
28
32
  ]),
29
33
  supportedAggregates: (0, support_1.supportedAggregates)([
30
34
  'sum',
@@ -50,4 +50,4 @@ export type SupportedAggregates = {
50
50
  [id: string]: SupportedAggregate;
51
51
  };
52
52
  export type SupportedAggregateOption = string;
53
- export type SupportedTimeFunctions = 'minute' | 'hour' | 'second' | 'week' | 'quarter' | 'year' | 'month' | 'day';
53
+ export type SupportedTimeFunctions = 'minute' | 'hour' | 'second' | 'week' | 'quarter' | 'year' | 'month' | 'day' | 'dayOfMonthOnly' | 'dayOfWeekOnly' | 'hourOfDayOnly' | 'weekOfYearOnly';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizzly/semantic-layer-public",
3
- "version": "0.0.107",
3
+ "version": "0.0.109",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",