diff --git a/src/query-builder/SelectQueryBuilder.ts b/src/query-builder/SelectQueryBuilder.ts index 242a68fa10..582586c8ab 100644 --- a/src/query-builder/SelectQueryBuilder.ts +++ b/src/query-builder/SelectQueryBuilder.ts @@ -272,7 +272,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - innerJoin(entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition: string = "", parameters?: ObjectLiteral): this { + innerJoin(entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition?: string, parameters?: ObjectLiteral): this { this.join("INNER", entityOrProperty, alias, condition, parameters); return this; } @@ -311,7 +311,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - leftJoin(entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition: string = "", parameters?: ObjectLiteral): this { + leftJoin(entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition?: string, parameters?: ObjectLiteral): this { this.join("LEFT", entityOrProperty, alias, condition, parameters); return this; } @@ -350,7 +350,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - innerJoinAndSelect(entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition: string = "", parameters?: ObjectLiteral): this { + innerJoinAndSelect(entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition?: string, parameters?: ObjectLiteral): this { this.addSelect(alias); this.innerJoin(entityOrProperty, alias, condition, parameters); return this; @@ -376,7 +376,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - leftJoinAndSelect(entity: Function|string, alias: string, condition: string, parameters?: ObjectLiteral): this; + leftJoinAndSelect(entity: Function|string, alias: string, condition?: string, parameters?: ObjectLiteral): this; /** * LEFT JOINs table and adds all selection properties to SELECT. @@ -390,7 +390,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - leftJoinAndSelect(entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition: string = "", parameters?: ObjectLiteral): this { + leftJoinAndSelect(entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition?: string, parameters?: ObjectLiteral): this { this.addSelect(alias); this.leftJoin(entityOrProperty, alias, condition, parameters); return this; @@ -423,7 +423,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - innerJoinAndMapMany(mapToProperty: string, entity: Function|string, alias: string, condition: string, parameters?: ObjectLiteral): this; + innerJoinAndMapMany(mapToProperty: string, entity: Function|string, alias: string, condition?: string, parameters?: ObjectLiteral): this; /** * INNER JOINs table, SELECTs the data returned by a join and MAPs all that data to some entity's property. @@ -432,7 +432,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - innerJoinAndMapMany(mapToProperty: string, tableName: string, alias: string, condition: string, parameters?: ObjectLiteral): this; + innerJoinAndMapMany(mapToProperty: string, tableName: string, alias: string, condition?: string, parameters?: ObjectLiteral): this; /** * INNER JOINs, SELECTs the data returned by a join and MAPs all that data to some entity's property. @@ -441,7 +441,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - innerJoinAndMapMany(mapToProperty: string, entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition: string = "", parameters?: ObjectLiteral): this { + innerJoinAndMapMany(mapToProperty: string, entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition?: string, parameters?: ObjectLiteral): this { this.addSelect(alias); this.join("INNER", entityOrProperty, alias, condition, parameters, mapToProperty, true); return this; @@ -474,7 +474,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - innerJoinAndMapOne(mapToProperty: string, entity: Function|string, alias: string, condition: string, parameters?: ObjectLiteral): this; + innerJoinAndMapOne(mapToProperty: string, entity: Function|string, alias: string, condition?: string, parameters?: ObjectLiteral): this; /** * INNER JOINs table, SELECTs the data returned by a join and MAPs all that data to some entity's property. @@ -483,7 +483,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - innerJoinAndMapOne(mapToProperty: string, tableName: string, alias: string, condition: string, parameters?: ObjectLiteral): this; + innerJoinAndMapOne(mapToProperty: string, tableName: string, alias: string, condition?: string, parameters?: ObjectLiteral): this; /** * INNER JOINs, SELECTs the data returned by a join and MAPs all that data to some entity's property. @@ -492,7 +492,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - innerJoinAndMapOne(mapToProperty: string, entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition: string = "", parameters?: ObjectLiteral): this { + innerJoinAndMapOne(mapToProperty: string, entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition?: string, parameters?: ObjectLiteral): this { this.addSelect(alias); this.join("INNER", entityOrProperty, alias, condition, parameters, mapToProperty, false); return this; @@ -525,7 +525,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - leftJoinAndMapMany(mapToProperty: string, entity: Function|string, alias: string, condition: string, parameters?: ObjectLiteral): this; + leftJoinAndMapMany(mapToProperty: string, entity: Function|string, alias: string, condition?: string, parameters?: ObjectLiteral): this; /** * LEFT JOINs table, SELECTs the data returned by a join and MAPs all that data to some entity's property. @@ -534,7 +534,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - leftJoinAndMapMany(mapToProperty: string, tableName: string, alias: string, condition: string, parameters?: ObjectLiteral): this; + leftJoinAndMapMany(mapToProperty: string, tableName: string, alias: string, condition?: string, parameters?: ObjectLiteral): this; /** * LEFT JOINs, SELECTs the data returned by a join and MAPs all that data to some entity's property. @@ -543,7 +543,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - leftJoinAndMapMany(mapToProperty: string, entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition: string = "", parameters?: ObjectLiteral): this { + leftJoinAndMapMany(mapToProperty: string, entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition?: string, parameters?: ObjectLiteral): this { this.addSelect(alias); this.join("LEFT", entityOrProperty, alias, condition, parameters, mapToProperty, true); return this; @@ -576,7 +576,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - leftJoinAndMapOne(mapToProperty: string, entity: Function|string, alias: string, condition: string, parameters?: ObjectLiteral): this; + leftJoinAndMapOne(mapToProperty: string, entity: Function|string, alias: string, condition?: string, parameters?: ObjectLiteral): this; /** * LEFT JOINs table, SELECTs the data returned by a join and MAPs all that data to some entity's property. @@ -585,7 +585,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - leftJoinAndMapOne(mapToProperty: string, tableName: string, alias: string, condition: string, parameters?: ObjectLiteral): this; + leftJoinAndMapOne(mapToProperty: string, tableName: string, alias: string, condition?: string, parameters?: ObjectLiteral): this; /** * LEFT JOINs, SELECTs the data returned by a join and MAPs all that data to some entity's property. @@ -594,7 +594,7 @@ export class SelectQueryBuilder extends QueryBuilder implements * You also need to specify an alias of the joined data. * Optionally, you can add condition and parameters used in condition. */ - leftJoinAndMapOne(mapToProperty: string, entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition: string = "", parameters?: ObjectLiteral): this { + leftJoinAndMapOne(mapToProperty: string, entityOrProperty: Function|string|((qb: SelectQueryBuilder) => SelectQueryBuilder), alias: string, condition?: string, parameters?: ObjectLiteral): this { this.addSelect(alias); this.join("LEFT", entityOrProperty, alias, condition, parameters, mapToProperty, false); return this;