• 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

6.67
/src/query-builder/QueryBuilderUtils.ts
1
/**
2
 * Helper utility functions for QueryBuilder.
3
 */
4
export class QueryBuilderUtils {
1✔
5
    /**
6
     * Checks if given value is a string representation of alias property,
7
     * e.g. "post.category" or "post.id".
8
     */
9
    static isAliasProperty(str: any): str is string {
10
        // alias property must be a string and must have a dot separator
UNCOV
11
        if (typeof str !== "string" || str.indexOf(".") === -1) return false
×
12

13
        // extra alias and its property relation
UNCOV
14
        const [aliasName, propertyName] = str.split(".") // todo: what about relations in embedded?
×
UNCOV
15
        if (!aliasName || !propertyName) return false
×
16

17
        // alias and property must be represented in a special format
18
        // const aliasNameRegexp = /^[a-zA-Z0-9_-]+$/;
19
        // if (!aliasNameRegexp.test(aliasName) || !aliasNameRegexp.test(propertyName))
20
        //     return false;
21
        // make sure string is not a subquery
UNCOV
22
        if (str.indexOf("(") !== -1 || str.indexOf(")") !== -1) return false
×
23

UNCOV
24
        return true
×
25
    }
26
}
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