@xuda.io/xuda-worker-bundle-min 1.3.789 → 1.3.790
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/index.js +26 -26
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2067,7 +2067,7 @@ func.datasource.execute = async function (
|
|
|
2067
2067
|
if (tree_ret.menuType === "get_data") {
|
|
2068
2068
|
return 1;
|
|
2069
2069
|
}
|
|
2070
|
-
ret = _ds.
|
|
2070
|
+
ret = _ds.progDataSource?.dataSourceLimit;
|
|
2071
2071
|
|
|
2072
2072
|
if (prog_obj.progDataSource?.dataSourceLoopExp) {
|
|
2073
2073
|
ret = (
|
|
@@ -2086,7 +2086,7 @@ func.datasource.execute = async function (
|
|
|
2086
2086
|
const calc_batch_loops = async () => {
|
|
2087
2087
|
if (
|
|
2088
2088
|
!prog_obj.progDataSource?.dataSourceType ||
|
|
2089
|
-
_ds.
|
|
2089
|
+
_ds.progDataSource.dataSourceType === "none"
|
|
2090
2090
|
) {
|
|
2091
2091
|
_ds.v.batch_loops = await get_limit();
|
|
2092
2092
|
return false;
|
|
@@ -2410,7 +2410,7 @@ func.datasource.execute = async function (
|
|
|
2410
2410
|
0,
|
|
2411
2411
|
_ds.api_rendered_output.length - 1
|
|
2412
2412
|
);
|
|
2413
|
-
if (Number(_ds.
|
|
2413
|
+
if (Number(_ds.progDataSource?.dataSourceLimit) === 1) {
|
|
2414
2414
|
_ds.api_rendered_output = str;
|
|
2415
2415
|
} else {
|
|
2416
2416
|
_ds.api_rendered_output = "[" + str + "]";
|
|
@@ -2495,7 +2495,7 @@ func.datasource.execute = async function (
|
|
|
2495
2495
|
case "set_data":
|
|
2496
2496
|
if (
|
|
2497
2497
|
!prog_obj.progDataSource?.dataSourceType ||
|
|
2498
|
-
_ds.
|
|
2498
|
+
_ds.progDataSource.dataSourceType !== "table" ||
|
|
2499
2499
|
!_ds._dataSourceTableId
|
|
2500
2500
|
) {
|
|
2501
2501
|
return func.utils.debug_report(
|
|
@@ -2731,7 +2731,7 @@ func.datasource.render_fields_dataset = async function (
|
|
|
2731
2731
|
var fieldType = view_field_obj?.props?.fieldType;
|
|
2732
2732
|
let table_field_obj;
|
|
2733
2733
|
if (view_field_obj.data.type === "table" && field_id !== "REDUCE_VALUE") {
|
|
2734
|
-
if (!_ds.
|
|
2734
|
+
if (!_ds.progDataSource?.dataSourceTableId) {
|
|
2735
2735
|
return func.utils.debug_report(
|
|
2736
2736
|
SESSION_ID,
|
|
2737
2737
|
"Datasource",
|
|
@@ -2852,7 +2852,7 @@ func.datasource.render_fields_form = async function (
|
|
|
2852
2852
|
data
|
|
2853
2853
|
) {
|
|
2854
2854
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dataSourceSession];
|
|
2855
|
-
var v = _ds.v;
|
|
2855
|
+
// var v = _ds.v;
|
|
2856
2856
|
|
|
2857
2857
|
const _progFields = await func.datasource.get_progFields(
|
|
2858
2858
|
SESSION_ID,
|
|
@@ -3009,7 +3009,7 @@ func.datasource.run_rows_form = async function (
|
|
|
3009
3009
|
) {
|
|
3010
3010
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dataSourceSession];
|
|
3011
3011
|
if (!_ds) return;
|
|
3012
|
-
var v = _ds.v;
|
|
3012
|
+
// var v = _ds.v;
|
|
3013
3013
|
|
|
3014
3014
|
var val = _ds.v.raw_data.rows[rowIdxP];
|
|
3015
3015
|
|
|
@@ -3041,7 +3041,7 @@ func.datasource.run_rows_form = async function (
|
|
|
3041
3041
|
SESSION_ID,
|
|
3042
3042
|
dataSourceSession,
|
|
3043
3043
|
"form",
|
|
3044
|
-
_ds.
|
|
3044
|
+
_ds.progDataSource.dataSourceSortScript,
|
|
3045
3045
|
idx,
|
|
3046
3046
|
sort_index
|
|
3047
3047
|
);
|
|
@@ -3049,7 +3049,7 @@ func.datasource.run_rows_form = async function (
|
|
|
3049
3049
|
SESSION_ID,
|
|
3050
3050
|
dataSourceSession,
|
|
3051
3051
|
"form",
|
|
3052
|
-
_ds.
|
|
3052
|
+
_ds.progDataSource.dataSourceGroupByScript,
|
|
3053
3053
|
idx,
|
|
3054
3054
|
sort_index
|
|
3055
3055
|
);
|
|
@@ -3065,10 +3065,10 @@ func.datasource.run_rows_form = async function (
|
|
|
3065
3065
|
_ds.rows_found--;
|
|
3066
3066
|
_ds.viewRangeExp_rows_deleted++;
|
|
3067
3067
|
};
|
|
3068
|
-
if (_ds.
|
|
3068
|
+
if (_ds.progDataSource?.dataSourceFiltersScript) {
|
|
3069
3069
|
var res = await func.datasource.validate_viewRange(
|
|
3070
3070
|
SESSION_ID,
|
|
3071
|
-
_ds.
|
|
3071
|
+
_ds.progDataSource.dataSourceFiltersScript,
|
|
3072
3072
|
dataSourceSession,
|
|
3073
3073
|
idx,
|
|
3074
3074
|
"form"
|
|
@@ -3084,10 +3084,10 @@ func.datasource.run_rows_form = async function (
|
|
|
3084
3084
|
}
|
|
3085
3085
|
await sort_form();
|
|
3086
3086
|
|
|
3087
|
-
if (_ds.
|
|
3087
|
+
if (_ds.progDataSource?.dataSourceLocateScript) {
|
|
3088
3088
|
var res = func.datasource.validate_viewLocate(
|
|
3089
3089
|
SESSION_ID,
|
|
3090
|
-
_ds.
|
|
3090
|
+
_ds.progDataSource.dataSourceLocateScript,
|
|
3091
3091
|
dataSourceSession,
|
|
3092
3092
|
idx,
|
|
3093
3093
|
"form"
|
|
@@ -3096,7 +3096,7 @@ func.datasource.run_rows_form = async function (
|
|
|
3096
3096
|
_ds.locatedRecordId = idx;
|
|
3097
3097
|
}
|
|
3098
3098
|
}
|
|
3099
|
-
if (_ds.
|
|
3099
|
+
if (_ds.progDataSource?.dataSourceFiltersScript) {
|
|
3100
3100
|
return;
|
|
3101
3101
|
}
|
|
3102
3102
|
};
|
|
@@ -3555,7 +3555,7 @@ func.datasource.get_event_interval_arr = function (
|
|
|
3555
3555
|
typeP
|
|
3556
3556
|
) {
|
|
3557
3557
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dataSourceSession];
|
|
3558
|
-
var v = _ds.v;
|
|
3558
|
+
// var v = _ds.v;
|
|
3559
3559
|
var arr = [];
|
|
3560
3560
|
|
|
3561
3561
|
var ret = 0;
|
|
@@ -4489,8 +4489,8 @@ func.datasource.interval = function (session_id, dsSessionP, typeP) {
|
|
|
4489
4489
|
var SESSION_ID = session_id;
|
|
4490
4490
|
var interval = [];
|
|
4491
4491
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dsSessionP];
|
|
4492
|
-
var ds = _ds;
|
|
4493
|
-
var v = ds.v;
|
|
4492
|
+
// var ds = _ds;
|
|
4493
|
+
// var v = ds.v;
|
|
4494
4494
|
// var arr = func.datasource.get_event_interval_arr(
|
|
4495
4495
|
// SESSION_ID,
|
|
4496
4496
|
// dsSessionP,
|
|
@@ -4557,8 +4557,8 @@ func.datasource.interval = function (session_id, dsSessionP, typeP) {
|
|
|
4557
4557
|
func.datasource.server_cron = function (session_id) {
|
|
4558
4558
|
var SESSION_ID = session_id;
|
|
4559
4559
|
var jobs = [];
|
|
4560
|
-
var ds = SESSION_OBJ[SESSION_ID].DS_GLB[0];
|
|
4561
|
-
var v = ds.v;
|
|
4560
|
+
// var ds = SESSION_OBJ[SESSION_ID].DS_GLB[0];
|
|
4561
|
+
// var v = ds.v;
|
|
4562
4562
|
var arr = func.datasource.get_event_interval_arr(
|
|
4563
4563
|
SESSION_ID,
|
|
4564
4564
|
0,
|
|
@@ -4626,14 +4626,14 @@ func.datasource.get_viewLoops = async function (
|
|
|
4626
4626
|
if (batch_source === "db_data") ret = _.size(data.rows);
|
|
4627
4627
|
if (batch_source === "array" || batch_source === "csv") ret = data.length;
|
|
4628
4628
|
if (batch_source === "json") ret = Object.keys(data).length;
|
|
4629
|
-
if (_ds.
|
|
4629
|
+
if (_ds.progDataSource?.dataSourceLimit) {
|
|
4630
4630
|
if (
|
|
4631
4631
|
batch_source !== "no_data" &&
|
|
4632
|
-
Number(_ds.
|
|
4632
|
+
Number(_ds.progDataSource?.dataSourceLimit) < ret
|
|
4633
4633
|
) {
|
|
4634
|
-
ret = Number(_ds.
|
|
4634
|
+
ret = Number(_ds.progDataSource.dataSourceLimit);
|
|
4635
4635
|
}
|
|
4636
|
-
if (!batch_source) ret = Number(_ds.
|
|
4636
|
+
if (!batch_source) ret = Number(_ds.progDataSource.dataSourceLimit);
|
|
4637
4637
|
}
|
|
4638
4638
|
if (prog_obj.progDataSource?.dataSourceLoopExp) {
|
|
4639
4639
|
var n = (
|
|
@@ -4668,7 +4668,7 @@ func.datasource.set_VIEW_data = async function (SESSION_ID, args, _ds) {
|
|
|
4668
4668
|
_ds.v.dataSourceSrcType = view.dataSourceSrcType;
|
|
4669
4669
|
_ds.v.viewExitExp = view.dataSourceExitScript;
|
|
4670
4670
|
|
|
4671
|
-
if (view.progDataSource) _ds.
|
|
4671
|
+
if (view.progDataSource) _ds.progDataSource = view.progDataSource;
|
|
4672
4672
|
|
|
4673
4673
|
_ds.v.viewIndex = view?.progDataSource?.dataSourceIndexesObj;
|
|
4674
4674
|
|
|
@@ -4686,8 +4686,8 @@ func.datasource.set_VIEW_data = async function (SESSION_ID, args, _ds) {
|
|
|
4686
4686
|
if (view.progEvents) _ds.v.progEvents = view.progEvents;
|
|
4687
4687
|
|
|
4688
4688
|
_ds._progDataSource_fields = [];
|
|
4689
|
-
if (_ds.
|
|
4690
|
-
let ret = func.expression.parse(JSON.stringify(_ds.
|
|
4689
|
+
if (_ds.progDataSource) {
|
|
4690
|
+
let ret = func.expression.parse(JSON.stringify(_ds.progDataSource));
|
|
4691
4691
|
_ds._progDataSource_fields = ret.map((e) => {
|
|
4692
4692
|
if (e.fieldId) return e.fieldId;
|
|
4693
4693
|
});
|