spice-js 2.6.8 → 2.6.9
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/build/models/SpiceModel.js +1 -15
- package/package.json +1 -1
- package/src/models/SpiceModel.js +0 -16
|
@@ -929,10 +929,8 @@ class SpiceModel {
|
|
|
929
929
|
|
|
930
930
|
results = _cached_results2 == null ? void 0 : _cached_results2.value;
|
|
931
931
|
var shouleForceRefresh = yield _this11.shouldForceRefresh(_cached_results2);
|
|
932
|
-
console.log("Cache Results", _this11.type, (_cached_results2 == null ? void 0 : _cached_results2.value) == undefined, shouleForceRefresh, (_cached_results2 == null ? void 0 : _cached_results2.value) == undefined || shouleForceRefresh);
|
|
933
932
|
|
|
934
933
|
if ((_cached_results2 == null ? void 0 : _cached_results2.value) == undefined || shouleForceRefresh) {
|
|
935
|
-
console.log("Getting From Database With Cache", _this11.type);
|
|
936
934
|
results = yield _this11.database.search(_this11.type, args.columns || "", query || "", args.limit, args.offset, args.sort, args.do_count, args.statement_consistent);
|
|
937
935
|
|
|
938
936
|
_this11.getCacheProviderObject(_this11.type).set(key, {
|
|
@@ -962,8 +960,7 @@ class SpiceModel {
|
|
|
962
960
|
console.log(e);
|
|
963
961
|
}
|
|
964
962
|
|
|
965
|
-
results.data = filterResultsByColumns(results.data, args.columns);
|
|
966
|
-
|
|
963
|
+
results.data = filterResultsByColumns(results.data, args.columns);
|
|
967
964
|
return results;
|
|
968
965
|
} catch (e) {
|
|
969
966
|
console.log(e.stack);
|
|
@@ -1044,16 +1041,6 @@ class SpiceModel {
|
|
|
1044
1041
|
data = Array.of(data);
|
|
1045
1042
|
}
|
|
1046
1043
|
|
|
1047
|
-
function log() {
|
|
1048
|
-
if (source_property === "entity") {
|
|
1049
|
-
for (var _len = arguments.length, message = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1050
|
-
message[_key] = arguments[_key];
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
console.log(message);
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
1044
|
var classes = _.isArray(Class) ? Class : [Class];
|
|
1058
1045
|
var ids = [];
|
|
1059
1046
|
|
|
@@ -1079,7 +1066,6 @@ class SpiceModel {
|
|
|
1079
1066
|
var result_found = _.find(ug, g => {
|
|
1080
1067
|
return g.id == result[source_property];
|
|
1081
1068
|
}) || {};
|
|
1082
|
-
log(result[source_property], result_found.id);
|
|
1083
1069
|
result[store_property] = result_found;
|
|
1084
1070
|
return result;
|
|
1085
1071
|
});
|
package/package.json
CHANGED
package/src/models/SpiceModel.js
CHANGED
|
@@ -854,15 +854,7 @@ export default class SpiceModel {
|
|
|
854
854
|
let shouleForceRefresh = await this.shouldForceRefresh(
|
|
855
855
|
cached_results
|
|
856
856
|
);
|
|
857
|
-
console.log(
|
|
858
|
-
"Cache Results",
|
|
859
|
-
this.type,
|
|
860
|
-
cached_results?.value == undefined,
|
|
861
|
-
shouleForceRefresh,
|
|
862
|
-
cached_results?.value == undefined || shouleForceRefresh
|
|
863
|
-
);
|
|
864
857
|
if (cached_results?.value == undefined || shouleForceRefresh) {
|
|
865
|
-
console.log("Getting From Database With Cache", this.type);
|
|
866
858
|
results = await this.database.search(
|
|
867
859
|
this.type,
|
|
868
860
|
args.columns || "",
|
|
@@ -913,7 +905,6 @@ export default class SpiceModel {
|
|
|
913
905
|
console.log(e);
|
|
914
906
|
}
|
|
915
907
|
results.data = filterResultsByColumns(results.data, args.columns);
|
|
916
|
-
//console.log("Trimmed Results", trimmed_results);
|
|
917
908
|
return results;
|
|
918
909
|
} catch (e) {
|
|
919
910
|
console.log(e.stack);
|
|
@@ -975,12 +966,6 @@ export default class SpiceModel {
|
|
|
975
966
|
data = Array.of(data);
|
|
976
967
|
}
|
|
977
968
|
|
|
978
|
-
function log(...message) {
|
|
979
|
-
if (source_property === "entity") {
|
|
980
|
-
console.log(message);
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
|
|
984
969
|
let classes = _.isArray(Class) ? Class : [Class];
|
|
985
970
|
|
|
986
971
|
let ids = [];
|
|
@@ -1016,7 +1001,6 @@ export default class SpiceModel {
|
|
|
1016
1001
|
_.find(ug, (g) => {
|
|
1017
1002
|
return g.id == result[source_property];
|
|
1018
1003
|
}) || {};
|
|
1019
|
-
log(result[source_property], result_found.id);
|
|
1020
1004
|
result[store_property] = result_found;
|
|
1021
1005
|
return result;
|
|
1022
1006
|
});
|