github
3964 of 4157 branches covered (95.36%)
454 of 493 new or added lines in 29 files covered. (92.09%)
26538 of 32109 relevant lines covered (82.65%)
1222.68 hits per line
1 |
import { NumberFieldCore } from '@teable/core'; |
4✔ |
|
import type { FieldBase } from '../field-base'; |
4✔ |
|
|
4✔ |
|
export class NumberFieldDto extends NumberFieldCore implements FieldBase { |
4✔ |
|
get isStructuredCellValue() { |
4✔ |
NEW
|
return false; |
× |
NEW
|
} |
× |
8 |
|
4✔ |
9 |
convertCellValue2DBValue(value: unknown): unknown { |
|
10 |
if (this.isMultipleCellValue) { |
|
11 |
return value == null ? value : JSON.stringify(value);
|
|
12 |
} |
|
13 |
return value;
|
771✔ |
14 |
} |
771✔ |
15 |
|
4✔ |
16 |
convertDBValue2CellValue(value: unknown): unknown { |
|
17 |
if (this.isMultipleCellValue) { |
|
18 |
return value == null || typeof value === 'object' ? value : JSON.parse(value as string); |
|
19 |
} |
|
20 |
return value;
|
13,162✔ |
21 |
} |
13,162✔ |
22 |
} |
4✔ |