• 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

16.67
/src/schema-builder/table/TableExclusion.ts
1
import { TableExclusionOptions } from "../options/TableExclusionOptions"
2
import { ExclusionMetadata } from "../../metadata/ExclusionMetadata"
3

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

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

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

19
    /**
20
     * Exclusion expression.
21
     */
22
    expression?: string
23

24
    // -------------------------------------------------------------------------
25
    // Constructor
26
    // -------------------------------------------------------------------------
27

28
    constructor(options: TableExclusionOptions) {
UNCOV
29
        this.name = options.name
×
UNCOV
30
        this.expression = options.expression
×
31
    }
32

33
    // -------------------------------------------------------------------------
34
    // Public Methods
35
    // -------------------------------------------------------------------------
36

37
    /**
38
     * Creates a new copy of this constraint with exactly same properties.
39
     */
40
    clone(): TableExclusion {
UNCOV
41
        return new TableExclusion(<TableExclusionOptions>{
×
42
            name: this.name,
43
            expression: this.expression,
44
        })
45
    }
46

47
    // -------------------------------------------------------------------------
48
    // Static Methods
49
    // -------------------------------------------------------------------------
50

51
    /**
52
     * Creates exclusions from the exclusion metadata object.
53
     */
54
    static create(exclusionMetadata: ExclusionMetadata): TableExclusion {
UNCOV
55
        return new TableExclusion(<TableExclusionOptions>{
×
56
            name: exclusionMetadata.name,
57
            expression: exclusionMetadata.expression,
58
        })
59
    }
60
}
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