• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 8389227144

22 Mar 2024 10:56AM UTC coverage: 26.087% (-53.9%) from 79.937%
8389227144

push

github

web-flow
refactor: move zod schema to openapi (#487)

2100 of 3363 branches covered (62.44%)

282 of 757 new or added lines in 74 files covered. (37.25%)

14879 existing lines in 182 files now uncovered.

25574 of 98035 relevant lines covered (26.09%)

5.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

35.0
/apps/nestjs-backend/src/db-provider/aggregation-query/sqlite/aggregation-function.sqlite.ts
1
import { NotImplementedException } from '@nestjs/common';
1✔
2
import { FieldType } from '@teable/core';
1✔
3
import { AbstractAggregationFunction } from '../aggregation-function.abstract';
1✔
4

1✔
5
export class AggregationFunctionSqlite extends AbstractAggregationFunction {
1✔
6
  unique(): string {
1✔
UNCOV
7
    const { type, isMultipleCellValue } = this.field;
×
UNCOV
8
    if (type !== FieldType.User || isMultipleCellValue) {
×
UNCOV
9
      return super.unique();
×
UNCOV
10
    }
×
UNCOV
11

×
UNCOV
12
    return this.knex
×
UNCOV
13
      .raw(`COUNT(DISTINCT json_extract(??, '$.id'))`, [this.tableColumnRef])
×
UNCOV
14
      .toQuery();
×
UNCOV
15
  }
×
16

1✔
17
  percentUnique(): string {
1✔
UNCOV
18
    const { type, isMultipleCellValue } = this.field;
×
UNCOV
19
    if (type !== FieldType.User || isMultipleCellValue) {
×
UNCOV
20
      return super.percentUnique();
×
UNCOV
21
    }
×
UNCOV
22

×
UNCOV
23
    return this.knex
×
UNCOV
24
      .raw(`(COUNT(DISTINCT json_extract(??, '$.id')) * 1.0 / COUNT(*)) * 100`, [
×
UNCOV
25
        this.tableColumnRef,
×
UNCOV
26
      ])
×
UNCOV
27
      .toQuery();
×
UNCOV
28
  }
×
29
  dateRangeOfDays(): string {
1✔
30
    throw new NotImplementedException();
×
31
  }
×
32

1✔
33
  dateRangeOfMonths(): string {
1✔
34
    throw new NotImplementedException();
×
35
  }
×
36

1✔
37
  totalAttachmentSize(): string {
1✔
38
    return `SELECT SUM(json_extract(json_each.value, '$.size')) AS value FROM ${this.dbTableName}, json_each(${this.tableColumnRef})`;
×
39
  }
×
40
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc