rez_core 6.1.4 → 6.1.5

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.
@@ -45,7 +45,7 @@ let FlatjsonFilterService = class FlatjsonFilterService {
45
45
  attributes = attributes ?? [];
46
46
  const attributeMetaMap = {};
47
47
  attributes.forEach((attr) => {
48
- attributeMetaMap[attr.flat_json_key] = attr;
48
+ attributeMetaMap[attr.attribute_key] = attr;
49
49
  });
50
50
  await this.loggingService.log('debug', 'FlatjsonFilterService', 'applyFlatjsonFilter', `Loaded ${attributes.length} attributes`);
51
51
  let allFilters = [...quickFilter, ...attributeFilter];
@@ -68,7 +68,7 @@ let FlatjsonFilterService = class FlatjsonFilterService {
68
68
  if (tabs?.columnName && tabs?.value) {
69
69
  const tabMeta = attributeMetaMap[tabs.columnName];
70
70
  if (tabMeta) {
71
- const flatJsonKey = tabMeta.flat_json_key ||
71
+ const flatJsonKey = tabMeta.attribute_key ||
72
72
  `${entity_type}__${tabs.columnName}`;
73
73
  qb.andWhere(`json_data->>'${flatJsonKey}' = :tabValue`, {
74
74
  tabValue: tabs.value,
@@ -79,7 +79,7 @@ let FlatjsonFilterService = class FlatjsonFilterService {
79
79
  if (tabs?.columnName && !tabs?.value) {
80
80
  const tabMeta = attributeMetaMap[tabs.columnName];
81
81
  if (tabMeta) {
82
- const flatJsonKey = tabMeta.flat_json_key ||
82
+ const flatJsonKey = tabMeta.attribute_key ||
83
83
  `${entity_type}__${tabs.columnName}`;
84
84
  tabCounts = await this.getJsonbTabCounts(entity_type, flatJsonKey, jsonbConditions);
85
85
  }
@@ -147,7 +147,7 @@ let FlatjsonFilterService = class FlatjsonFilterService {
147
147
  buildJsonbCondition(filter, meta) {
148
148
  if (!meta)
149
149
  return null;
150
- const flatJsonKey = meta.flat_json_key ||
150
+ const flatJsonKey = meta.attribute_key ||
151
151
  `${meta.mapped_entity_type}__${filter.filter_attribute}`;
152
152
  const op = filter.filter_operator;
153
153
  const val = filter.filter_value;
@@ -584,7 +584,7 @@ let FlatjsonFilterService = class FlatjsonFilterService {
584
584
  console.warn(`No metadata found for sort column: ${sort.sortColum}`);
585
585
  return;
586
586
  }
587
- const flatJsonKey = meta.flat_json_key || `${meta.mapped_entity_type}__${sort.sortColum}`;
587
+ const flatJsonKey = meta.attribute_key || `${meta.mapped_entity_type}__${sort.sortColum}`;
588
588
  const direction = sort.sortType === 'ASC' ? 'ASC' : 'DESC';
589
589
  let sortExpression;
590
590
  switch (meta.data_type) {