rez_core 5.0.161 → 5.0.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "5.0.161",
3
+ "version": "5.0.162",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -26,7 +26,10 @@ export class FilterService {
26
26
  @Inject() protected readonly loggingService: LoggingService,
27
27
  private readonly configService: ConfigService,
28
28
  private readonly reflectionHelper: ReflectionHelper,
29
- ) {}
29
+ ) {
30
+ }
31
+
32
+ schema = this.configService.get('DB_SCHEMA');
30
33
 
31
34
  private async gettab_value_counts(
32
35
  tableName: string,
@@ -74,11 +77,10 @@ export class FilterService {
74
77
  }
75
78
 
76
79
  const rawSQL = `
77
- SELECT ${column} AS tab_value, COUNT(*) AS tab_value_count
78
- FROM ${tableName}
79
- ${whereSQL}
80
- GROUP BY ${column}
81
- `;
80
+ SELECT ${column} AS tab_value, COUNT(*) AS tab_value_count
81
+ FROM ${tableName} ${whereSQL}
82
+ GROUP BY ${column}
83
+ `;
82
84
 
83
85
  const rows = await this.queryWithSchema(rawSQL, values);
84
86
 
@@ -479,7 +481,7 @@ export class FilterService {
479
481
  let qb = this.entityManager
480
482
  .createQueryBuilder()
481
483
  .select('e.*')
482
- .from(tableName, 'e');
484
+ .from(`${this.schema}.${tableName}`, 'e');
483
485
  dataWhere.forEach((clause) => qb.andWhere(clause.query, clause.params));
484
486
 
485
487
  // Apply sorting