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

typeorm / typeorm / 15219332477

23 May 2025 09:13PM UTC coverage: 17.216% (-59.1%) from 76.346%
15219332477

Pull #11332

github

naorpeled
cr comments - move if block
Pull Request #11332: feat: add new undefined and null behavior flags

1603 of 12759 branches covered (12.56%)

Branch coverage included in aggregate %.

0 of 31 new or added lines in 3 files covered. (0.0%)

14132 existing lines in 166 files now uncovered.

4731 of 24033 relevant lines covered (19.69%)

60.22 hits per line

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

10.0
/src/schema-builder/table/TableCheck.ts
1
import { TableCheckOptions } from "../options/TableCheckOptions"
2
import { CheckMetadata } from "../../metadata/CheckMetadata"
3

4
/**
5
 * Database's table check constraint stored in this class.
6
 */
7
export class TableCheck {
1✔
UNCOV
8
    readonly "@instanceof" = Symbol.for("TableCheck")
×
9

10
    // -------------------------------------------------------------------------
11
    // Public Properties
12
    // -------------------------------------------------------------------------
13

14
    /**
15
     * Constraint name.
16
     */
17
    name?: string
18

19
    /**
20
     * Column that contains this constraint.
21
     */
UNCOV
22
    columnNames?: string[] = []
×
23

24
    /**
25
     * Check expression.
26
     */
27
    expression?: string
28

29
    // -------------------------------------------------------------------------
30
    // Constructor
31
    // -------------------------------------------------------------------------
32

33
    constructor(options: TableCheckOptions) {
UNCOV
34
        this.name = options.name
×
UNCOV
35
        this.columnNames = options.columnNames
×
UNCOV
36
        this.expression = options.expression
×
37
    }
38

39
    // -------------------------------------------------------------------------
40
    // Public Methods
41
    // -------------------------------------------------------------------------
42

43
    /**
44
     * Creates a new copy of this constraint with exactly same properties.
45
     */
46
    clone(): TableCheck {
UNCOV
47
        return new TableCheck(<TableCheckOptions>{
×
48
            name: this.name,
49
            columnNames: this.columnNames ? [...this.columnNames] : [],
×
50
            expression: this.expression,
51
        })
52
    }
53

54
    // -------------------------------------------------------------------------
55
    // Static Methods
56
    // -------------------------------------------------------------------------
57

58
    /**
59
     * Creates checks from the check metadata object.
60
     */
61
    static create(checkMetadata: CheckMetadata): TableCheck {
UNCOV
62
        return new TableCheck(<TableCheckOptions>{
×
63
            name: checkMetadata.name,
64
            expression: checkMetadata.expression,
65
        })
66
    }
67
}
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

© 2025 Coveralls, Inc