semanticdb-core 1.0.48 → 1.0.50

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.
@@ -1,6 +1,6 @@
1
1
  export declare interface DataSourceItemType {
2
2
  id: string;
3
- client: 'clickhouse' | 'mysql' | 'postgres' | 'starrocks' | 'oracle' | 'impala' | 'sybase' | 'databricks' | 'doris' | "sqlserver";
3
+ client: 'clickhouse' | 'mysql' | 'postgres' | 'starrocks' | 'oracle' | 'impala' | 'sybase' | 'databricks' | 'doris' | "sqlserver" | 'gbase';
4
4
  connection: {
5
5
  database: string;
6
6
  host: string;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './schema/property';
2
2
  export * from './schema/schema';
3
3
  export * from './common/representation';
4
4
  export * from './common/dataSourceItem';
5
+ export * from './common/date';
5
6
  export * from './schema/schema.utils';
6
7
  export * from './schema/property.utils';
7
8
  export { getDrilldownDimensions } from './schema/schema.utils/getDrilldownDimensions';
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ __exportStar(require("./schema/property"), exports);
19
19
  __exportStar(require("./schema/schema"), exports);
20
20
  __exportStar(require("./common/representation"), exports);
21
21
  __exportStar(require("./common/dataSourceItem"), exports);
22
+ __exportStar(require("./common/date"), exports);
22
23
  __exportStar(require("./schema/schema.utils"), exports);
23
24
  __exportStar(require("./schema/property.utils"), exports);
24
25
  var getDrilldownDimensions_1 = require("./schema/schema.utils/getDrilldownDimensions");
@@ -252,6 +252,18 @@ const getFlattenQuery = (query) => {
252
252
  }
253
253
  }
254
254
  }
255
+ else if (k in flattenQuery) {
256
+ // 可以忽略$exists: true的
257
+ if (typeof v === 'object' && v && '$exists' in v && v.$exists === true) {
258
+ continue;
259
+ }
260
+ flattenQuery[k] = {
261
+ $and: [
262
+ flattenQuery[k],
263
+ v
264
+ ]
265
+ };
266
+ }
255
267
  else {
256
268
  flattenQuery[k] = v;
257
269
  }
@@ -14,7 +14,8 @@ const logicformResultToMarkdown = (ret, number_only) => {
14
14
  if (!logicform.groupby) {
15
15
  markdownText = columnProperties
16
16
  .map((p) => (number_only ? '' : (p.name + ': ')) +
17
- (0, property_utils_1.formatWithProperty)(p.ref ? schemas[p.ref] : schemas[logicform.schema], p, result[0][p.name], true))
17
+ (0, property_utils_1.formatWithProperty)(p.ref ? schemas[p.ref] : schemas[logicform.schema], Object.assign(Object.assign({}, p), { unit: undefined // p因为外面传过来的unit,可能是(万、亿),所以这里不添加
18
+ }), result[0][p.name], true))
18
19
  .join(',');
19
20
  }
20
21
  else {
@@ -25,7 +26,8 @@ const logicformResultToMarkdown = (ret, number_only) => {
25
26
  table: {
26
27
  headers: columnProperties.map((p) => p.name),
27
28
  rows: result.map((row) => columnProperties.reduce((acc, p) => {
28
- acc[p.name] = (0, property_utils_1.formatWithProperty)(p.ref ? schemas[p.ref] : schemas[logicform.schema], p, row[p.name], true);
29
+ acc[p.name] = (0, property_utils_1.formatWithProperty)(p.ref ? schemas[p.ref] : schemas[logicform.schema], Object.assign(Object.assign({}, p), { unit: undefined // p因为外面传过来的unit,可能是(万、亿),所以这里不添加
30
+ }), row[p.name], true);
29
31
  return acc;
30
32
  }, {})),
31
33
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semanticdb-core",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [