@514labs/moose-lib
Advanced tools
Comparing version 0.3.457 to 0.3.458
@@ -75,3 +75,5 @@ "use strict"; | ||
antiCachePath: () => antiCachePath, | ||
createAggregation: () => createAggregation, | ||
createClickhouseParameter: () => createClickhouseParameter, | ||
dropAggregation: () => dropAggregation, | ||
getClickhouseClient: () => getClickhouseClient, | ||
@@ -87,2 +89,13 @@ getFileName: () => getFileName, | ||
// src/blocks.ts | ||
function createAggregation(aggregation) { | ||
return `CREATE MATERIALIZED VIEW IF NOT EXISTS ${aggregation.name} | ||
ENGINE = AggregatingMergeTree() ORDER BY ${aggregation.orderBy} | ||
POPULATE | ||
AS ${aggregation.select}`; | ||
} | ||
function dropAggregation(name) { | ||
return `DROP VIEW IF EXISTS ${name}`; | ||
} | ||
// src/commons.ts | ||
@@ -260,3 +273,5 @@ var import_client_web = require("@clickhouse/client-web"); | ||
antiCachePath, | ||
createAggregation, | ||
createClickhouseParameter, | ||
dropAggregation, | ||
getClickhouseClient, | ||
@@ -263,0 +278,0 @@ getFileName, |
@@ -40,2 +40,14 @@ import * as _clickhouse_client_web from '@clickhouse/client-web'; | ||
interface AggregationBlock { | ||
name: string; | ||
select: string; | ||
orderBy: string; | ||
} | ||
interface Blocks { | ||
setup: string[]; | ||
teardown: string[]; | ||
} | ||
declare function createAggregation(aggregation: AggregationBlock): string; | ||
declare function dropAggregation(name: string): string; | ||
declare const antiCachePath: (path: string) => string; | ||
@@ -77,2 +89,2 @@ declare const walkDir: (dir: string, fileExtension: string, fileList: string[]) => string[]; | ||
export { type Aggregation, ConsumptionHelpers, type ConsumptionUtil, type DataModelConfig, IngestionFormat, type Key, MooseClient, type RawValue, Sql, type Value, antiCachePath, createClickhouseParameter, getClickhouseClient, getFileName, getValueFromParameter, join_queries, mapToClickHouseType, sql, walkDir }; | ||
export { type Aggregation, type Blocks, ConsumptionHelpers, type ConsumptionUtil, type DataModelConfig, IngestionFormat, type Key, MooseClient, type RawValue, Sql, type Value, antiCachePath, createAggregation, createClickhouseParameter, dropAggregation, getClickhouseClient, getFileName, getValueFromParameter, join_queries, mapToClickHouseType, sql, walkDir }; |
@@ -75,3 +75,5 @@ "use strict"; | ||
antiCachePath: () => antiCachePath, | ||
createAggregation: () => createAggregation, | ||
createClickhouseParameter: () => createClickhouseParameter, | ||
dropAggregation: () => dropAggregation, | ||
getClickhouseClient: () => getClickhouseClient, | ||
@@ -87,2 +89,13 @@ getFileName: () => getFileName, | ||
// src/blocks.ts | ||
function createAggregation(aggregation) { | ||
return `CREATE MATERIALIZED VIEW IF NOT EXISTS ${aggregation.name} | ||
ENGINE = AggregatingMergeTree() ORDER BY ${aggregation.orderBy} | ||
POPULATE | ||
AS ${aggregation.select}`; | ||
} | ||
function dropAggregation(name) { | ||
return `DROP VIEW IF EXISTS ${name}`; | ||
} | ||
// src/commons.ts | ||
@@ -260,3 +273,5 @@ var import_client_web = require("@clickhouse/client-web"); | ||
antiCachePath, | ||
createAggregation, | ||
createClickhouseParameter, | ||
dropAggregation, | ||
getClickhouseClient, | ||
@@ -263,0 +278,0 @@ getFileName, |
{ | ||
"name": "@514labs/moose-lib", | ||
"version": "0.3.457", | ||
"version": "0.3.458", | ||
"main": "./dist/index.js", | ||
@@ -14,6 +14,6 @@ "module": "./dist/index.mjs", | ||
"dependencies": { | ||
"@clickhouse/client-web": "^1.0.1", | ||
"fastq": "^1.17.1", | ||
"kafkajs": "^2.2.4", | ||
"ts-patch": "^3.1.2" | ||
"@clickhouse/client-web": "1.1.0", | ||
"fastq": "1.17.1", | ||
"kafkajs": "2.2.4", | ||
"ts-patch": "~3.2.0" | ||
}, | ||
@@ -26,3 +26,3 @@ "devDependencies": { | ||
"tsup": "^8.0.2", | ||
"typescript": "^5.4.0", | ||
"typescript": "~5.4.0", | ||
"@repo/ts-config": "0.0.0" | ||
@@ -29,0 +29,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
47704912
2869
+ Added@clickhouse/client-common@1.1.0(transitive)
+ Added@clickhouse/client-web@1.1.0(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedglobal-prefix@3.0.0(transitive)
+ Addedini@1.3.8(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedts-patch@3.2.1(transitive)
+ Addedwhich@1.3.1(transitive)
- Removed@clickhouse/client-common@1.10.1(transitive)
- Removed@clickhouse/client-web@1.10.1(transitive)
- Removedfastq@1.19.0(transitive)
- Removedglobal-prefix@4.0.0(transitive)
- Removedini@4.1.3(transitive)
- Removedisexe@3.1.1(transitive)
- Removedts-patch@3.3.0(transitive)
- Removedwhich@4.0.0(transitive)
Updated@clickhouse/client-web@1.1.0
Updatedfastq@1.17.1
Updatedkafkajs@2.2.4
Updatedts-patch@~3.2.0