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

typeorm / typeorm / 14796576772

02 May 2025 01:52PM UTC coverage: 45.367% (-30.9%) from 76.309%
14796576772

Pull #11434

github

web-flow
Merge ec4ce2d00 into fadad1a74
Pull Request #11434: feat: release PR releases using pkg.pr.new

5216 of 12761 branches covered (40.87%)

Branch coverage included in aggregate %.

11439 of 23951 relevant lines covered (47.76%)

15712.55 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 {
4✔
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) {
29
        this.name = options.name
×
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 {
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 {
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