@xuda.io/xuda-worker-bundle-min 1.3.845 → 1.3.847
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 +41 -43
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2184,11 +2184,10 @@ func.datasource.execute = async function (
|
|
|
2184
2184
|
if (_ds.prog_id === "system") {
|
|
2185
2185
|
//TBD tree_obj.menuType === "globals"
|
|
2186
2186
|
_ds.currentRecordId = "dataset";
|
|
2187
|
-
await func.datasource.render_fields_dataset(
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
);
|
|
2187
|
+
await func.datasource.render_fields_dataset(SESSION_ID, dataSourceSession, {
|
|
2188
|
+
id: "dataset",
|
|
2189
|
+
value: _session.url_params,
|
|
2190
|
+
});
|
|
2192
2191
|
|
|
2193
2192
|
return await callback_datasource();
|
|
2194
2193
|
}
|
|
@@ -2925,56 +2924,55 @@ func.datasource.render_fields_dataset = async function (
|
|
|
2925
2924
|
_ds.data_feed.rows.push({ _ROWID: _ds.currentRecordId });
|
|
2926
2925
|
row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
2927
2926
|
// console.error(err);
|
|
2928
|
-
}
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
for await (const val of _progFields) {
|
|
2932
|
-
try {
|
|
2933
|
-
var fieldId = val.data.field_id;
|
|
2934
|
-
|
|
2935
|
-
if (val.data.type === "virtual" || _ds.set_mode === "C") {
|
|
2936
|
-
if (typeof raw_data_row?.value?.[fieldId] !== "undefined") {
|
|
2937
|
-
// supports x=x+1
|
|
2938
|
-
_ds.data_feed.rows[row_idx][fieldId] = await get_value(
|
|
2939
|
-
fieldId,
|
|
2940
|
-
raw_data_row.value[fieldId]
|
|
2941
|
-
);
|
|
2942
|
-
continue;
|
|
2943
|
-
}
|
|
2927
|
+
}
|
|
2928
|
+
_ds.dataset_alias = {};
|
|
2944
2929
|
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
val.props?.propExpressions?.fieldValue,
|
|
2949
|
-
dataSourceSession,
|
|
2950
|
-
"update",
|
|
2951
|
-
args.rowIdP
|
|
2952
|
-
);
|
|
2953
|
-
_ds.data_feed.rows[row_idx][fieldId] = await get_value(
|
|
2954
|
-
fieldId,
|
|
2955
|
-
ret.result
|
|
2956
|
-
);
|
|
2957
|
-
continue;
|
|
2958
|
-
}
|
|
2930
|
+
for await (const val of _progFields) {
|
|
2931
|
+
try {
|
|
2932
|
+
var fieldId = val.data.field_id;
|
|
2959
2933
|
|
|
2934
|
+
if (val.data.type === "virtual" || _ds.set_mode === "C") {
|
|
2935
|
+
if (typeof raw_data_row?.value?.[fieldId] !== "undefined") {
|
|
2936
|
+
// supports x=x+1
|
|
2960
2937
|
_ds.data_feed.rows[row_idx][fieldId] = await get_value(
|
|
2961
2938
|
fieldId,
|
|
2962
|
-
|
|
2939
|
+
raw_data_row.value[fieldId]
|
|
2963
2940
|
);
|
|
2964
2941
|
continue;
|
|
2965
2942
|
}
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2943
|
+
|
|
2944
|
+
if (val.props?.propExpressions?.fieldValue) {
|
|
2945
|
+
let ret = await func.expression.get(
|
|
2946
|
+
SESSION_ID,
|
|
2947
|
+
val.props?.propExpressions?.fieldValue,
|
|
2948
|
+
dataSourceSession,
|
|
2949
|
+
"update",
|
|
2950
|
+
args.rowIdP
|
|
2951
|
+
);
|
|
2970
2952
|
_ds.data_feed.rows[row_idx][fieldId] = await get_value(
|
|
2971
2953
|
fieldId,
|
|
2972
|
-
|
|
2954
|
+
ret.result
|
|
2973
2955
|
);
|
|
2956
|
+
continue;
|
|
2974
2957
|
}
|
|
2975
|
-
|
|
2976
|
-
|
|
2958
|
+
|
|
2959
|
+
_ds.data_feed.rows[row_idx][fieldId] = await get_value(
|
|
2960
|
+
fieldId,
|
|
2961
|
+
val.props?.fieldValue
|
|
2962
|
+
);
|
|
2963
|
+
continue;
|
|
2964
|
+
}
|
|
2965
|
+
if (val.data.type === "table" || val.data.type === "datasource") {
|
|
2966
|
+
if (typeof raw_data_row.value[fieldId] === "undefined") {
|
|
2967
|
+
throw "field do not exist in data: " + fieldId;
|
|
2968
|
+
}
|
|
2969
|
+
_ds.data_feed.rows[row_idx][fieldId] = await get_value(
|
|
2970
|
+
fieldId,
|
|
2971
|
+
raw_data_row.value[fieldId]
|
|
2972
|
+
);
|
|
2977
2973
|
}
|
|
2974
|
+
} catch (err) {
|
|
2975
|
+
func.utils.debug_report(SESSION_ID, "Datasource", err, "E", null, _ds);
|
|
2978
2976
|
}
|
|
2979
2977
|
}
|
|
2980
2978
|
};
|