github
3878 of 4074 branches covered (95.19%)
402 of 435 new or added lines in 27 files covered. (92.41%)
26327 of 31880 relevant lines covered (82.58%)
1225.15 hits per line
1 |
import { NumberFieldCore } from '@teable/core'; |
4✔ |
2 |
import type { IFieldBase } from '../field-base'; |
4✔ |
3 |
|
4✔ |
4 |
export class NumberFieldDto extends NumberFieldCore implements IFieldBase { |
4✔ |
|
get isStructuredCellValue() { |
4✔ |
NEW
|
return false; |
× |
NEW
|
} |
× |
|
|
4✔ |
9 |
convertCellValue2DBValue(value: unknown): unknown { |
|
10 |
if (this.isMultipleCellValue) { |
|
11 |
return value == null ? value : JSON.stringify(value);
|
|
12 |
} |
|
13 |
return value;
|
758✔ |
14 |
} |
758✔ |
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,123✔ |
21 |
} |
13,123✔ |
22 |
} |
4✔ |