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

sequeljs / ast / 10011324420

19 Jul 2024 04:33PM UTC coverage: 100.0%. First build
10011324420

Pull #1263

github

web-flow
Merge cf51e7a38 into 7da6d29d8
Pull Request #1263: ci(ghactions): bump github/codeql-action from 3.25.12 to 3.25.13

513 of 513 branches covered (100.0%)

Branch coverage included in aggregate %.

2084 of 2084 relevant lines covered (100.0%)

328.69 hits per line

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

100.0
/src/attributes/Attribute.ts
1
import type Relation from '../interfaces/Relation'
2

3
import type AliasPredication from '../mixins/AliasPredication'
4
import type ConcatPredication from '../mixins/ConcatPredication'
5
import type Expressions from '../mixins/Expressions'
6
import type Math from '../mixins/Math'
7
import type OrderPredications from '../mixins/OrderPredications'
8
import type Predications from '../mixins/Predications'
9
import type WhenPredication from '../mixins/WhenPredication'
10

11
import type NamedSQLFunction from '../nodes/NamedSQLFunction'
12
import type SQLLiteral from '../nodes/SQLLiteral'
13

14
import type Visitable from '../visitors/Visitable'
15

16
/**
17
 * @category Attributes
18
 */
19
class Attribute {
20
  public relation: Relation
21

22
  public name: string | SQLLiteral
23

24
  constructor(relation: Relation, name: string | SQLLiteral) {
25
    this.name = name
2,073✔
26
    this.relation = relation
2,073✔
27
  }
28

29
  isAbleToTypeCast(): boolean {
30
    return this.relation.isAbleToTypeCast()
606✔
31
  }
32

33
  lower(): NamedSQLFunction {
34
    return this.relation.lower(this)
3✔
35
  }
36

37
  typeCastForDatabase(value: Visitable): number | string {
38
    return this.relation.typeCastForDatabase(this.name, value)
12✔
39
  }
40
}
41

42
interface Attribute
43
  extends AliasPredication,
44
    ConcatPredication,
45
    Expressions,
46
    Math,
47
    OrderPredications,
48
    Predications,
49
    WhenPredication {}
50

51
export default Attribute
13,716✔
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