@xuda.io/runtime-bundle 1.0.677 → 1.0.678

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.
@@ -28707,6 +28707,16 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
28707
28707
  filterModelUserSql: _ds.progDataSource.filterModelUserSql,
28708
28708
  };
28709
28709
 
28710
+ let _dataSourceFilterModelType = ds?.progDataSource?.dataSourceFilterModelType;
28711
+
28712
+ if (ds?.progDataSource?.dataSourceFilterModelTypeFx) {
28713
+ const fx_ret = await func.expression.get(SESSION_ID, _ds.progDataSource.dataSourceFilterModelTypeFx, dataSourceSession, 'query');
28714
+ _dataSourceFilterModelType = fx_ret.result;
28715
+ }
28716
+ if (!['query', 'index'].includes(_dataSourceFilterModelType)) {
28717
+ return func.utils.debug_report(SESSION_ID, 'Data source', `Valid values for dataSourceFilterModelType are: "query" or "index" (${_dataSourceFilterModelType})`, 'E');
28718
+ }
28719
+
28710
28720
  _ds.v.raw_data = await func.db.get_query(
28711
28721
  SESSION_ID,
28712
28722
  _ds._dataSourceTableId,
@@ -28722,27 +28732,11 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
28722
28732
  _ds?.progDataSource?.sortModel,
28723
28733
  null,
28724
28734
  filterModel,
28725
- _ds?.progDataSource?.dataSourceFilterModelType,
28735
+ _dataSourceFilterModelType,
28726
28736
  );
28727
28737
 
28728
28738
  if (_ds?.progDataSource?.dataSourceLimit) {
28729
- const ret_rows_found = await func.db.get_query(
28730
- SESSION_ID,
28731
- _ds._dataSourceTableId,
28732
- _ds.v.couchView,
28733
- dataSourceSession,
28734
- _ds.viewSourceDesc,
28735
- 'datasource table',
28736
- prog_obj.progDataSource.dataSourceReduce,
28737
- null,
28738
- null,
28739
- true,
28740
- null,
28741
- null,
28742
- null,
28743
- filterModel,
28744
- _ds?.progDataSource?.dataSourceFilterModelType,
28745
- );
28739
+ const ret_rows_found = await func.db.get_query(SESSION_ID, _ds._dataSourceTableId, _ds.v.couchView, dataSourceSession, _ds.viewSourceDesc, 'datasource table', prog_obj.progDataSource.dataSourceReduce, null, null, true, null, null, null, filterModel, _dataSourceFilterModelType);
28746
28740
  _ds.rows_found = ret_rows_found?.rows?.[0]?.value || 0;
28747
28741
  } else {
28748
28742
  _ds.rows_found = _ds?.v?.raw_data?.rows?.length || 0;