backend-plus 2.0.0-rc.5 → 2.0.0-rc.6
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/README.md +6 -6
- package/for-client/my-tables.js +9 -1
- package/lib/procedures-table.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,11 +6,11 @@ Backend for the anti Pareto rule.
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|

|
|
9
|
-
[](https://npmjs.org/package/backend-plus)
|
|
10
|
+
[](https://npmjs.org/package/backend-plus)
|
|
11
|
+
[](https://travis-ci.org/codenautas/backend-plus)
|
|
12
|
+
[](https://coveralls.io/r/codenautas/backend-plus)
|
|
13
|
+
[](https://david-dm.org/codenautas/backend-plus)
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
language: 
|
|
@@ -205,7 +205,7 @@ entry | usage
|
|
|
205
205
|
-----------------------------|---------------
|
|
206
206
|
server |
|
|
207
207
|
.port | port where is listening
|
|
208
|
-
.base-
|
|
208
|
+
.base-url | base url added to domain name
|
|
209
209
|
.module-store |
|
|
210
210
|
install | (see Spanish)
|
|
211
211
|
.dump | (see Spanish)
|
package/for-client/my-tables.js
CHANGED
|
@@ -690,11 +690,18 @@ myOwn.tableGrid = function tableGrid(tableName, mainElement, opts){
|
|
|
690
690
|
if (myOwn.config.config['grid-row-retain-moved-or-deleted'] && !force) {
|
|
691
691
|
var depotsToRetain = grid.depots.filter(depot => depot.tick == tick);
|
|
692
692
|
for (depot of depotsToRetain) {
|
|
693
|
+
depot.row['$refreshed'] = false
|
|
693
694
|
if (depot.tr && depot.tr.getAttribute('not-here')) depot.tr.removeAttribute('not-here')
|
|
694
695
|
}
|
|
695
696
|
}
|
|
696
697
|
while (depot = depotsToDelete.pop()) {
|
|
697
698
|
depot.manager.displayAsDeleted(depot, force ? 'change-ff' : 'unknown');
|
|
699
|
+
if (myOwn.config.config['grid-row-retain-moved-or-deleted']) {
|
|
700
|
+
if(!depot.row['$refreshed']){
|
|
701
|
+
grid.retrieveRowAndRefresh(depot,{retrieveIgnoringWhere:true})
|
|
702
|
+
depot.row['$refreshed'] = true
|
|
703
|
+
}
|
|
704
|
+
}
|
|
698
705
|
}
|
|
699
706
|
}
|
|
700
707
|
})
|
|
@@ -2385,7 +2392,8 @@ myOwn.TableGrid.prototype.displayGrid = function displayGrid(){
|
|
|
2385
2392
|
fixedFields:grid.def.primaryKey.map(function(fieldName, i){
|
|
2386
2393
|
return {fieldName:fieldName, value:depot.primaryKeyValues[i]};
|
|
2387
2394
|
}),
|
|
2388
|
-
pick:grid.def.pick
|
|
2395
|
+
pick:grid.def.pick,
|
|
2396
|
+
retrieveIgnoringWhere: opts.retrieveIgnoringWhere
|
|
2389
2397
|
}).then(function(result){
|
|
2390
2398
|
grid.depotRefresh(depot,{updatedRow:result[0], sendedForUpdate:{}}, opts);
|
|
2391
2399
|
})
|
package/lib/procedures-table.js
CHANGED
|
@@ -78,13 +78,14 @@ ProcedureTables = [
|
|
|
78
78
|
{name: 'table', encoding:'plain'},
|
|
79
79
|
{name: 'fixedFields', defaultValue:[]},
|
|
80
80
|
{name: 'paramfun', defaultValue:[]},
|
|
81
|
-
{name: 'pick', defaultValue:'', encoding:'plain'}
|
|
81
|
+
{name: 'pick', defaultValue:'', encoding:'plain'},
|
|
82
|
+
{name: 'retrieveIgnoringWhere', defaultValue:false}
|
|
82
83
|
],
|
|
83
84
|
coreFunction:
|
|
84
85
|
/**
|
|
85
86
|
*
|
|
86
87
|
* @param {*} context
|
|
87
|
-
* @param {{table:string, fixedFields:{fieldName:string, value:any, range:string}[], paramfun:string[], pick:string}} parameters
|
|
88
|
+
* @param {{table:string, fixedFields:{fieldName:string, value:any, range:string}[], paramfun:string[], pick:string, retrieveIgnoringWhere:boolean}} parameters * @param {{table:string, fixedFields:{fieldName:string, value:any, range:string}[], paramfun:string[], pick:string}} parameters
|
|
88
89
|
*/
|
|
89
90
|
async function tableDatum(context, parameters){
|
|
90
91
|
var be=context.be;
|
|
@@ -148,7 +149,7 @@ ProcedureTables = [
|
|
|
148
149
|
/** @type {string} */
|
|
149
150
|
var sql="SELECT "+[...defTable.sql.select].join(', ')+
|
|
150
151
|
"\n FROM "+defTable.sql.from+
|
|
151
|
-
"\n WHERE "+(defTable.sql.where||(defTable.allow.select && !defTable.forInsertOnlyMode?'true':'false'))+fixedClausule.join("")+
|
|
152
|
+
"\n WHERE "+((parameters.retrieveIgnoringWhere?'true':defTable.sql.where)||(defTable.allow.select && !defTable.forInsertOnlyMode?'true':'false'))+fixedClausule.join("")+
|
|
152
153
|
// " ORDER BY "+defTable.primaryKey.map(be.db.quoteIdent.bind(be.db)).join(',')
|
|
153
154
|
"\n ORDER BY "+(defTable.sql.orderBy||defTable.primaryKey).map(function(fieldName){ return be.db.quoteIdent(fieldName); }).join(',')
|
|
154
155
|
if(specialFixedClause.length){
|
package/package.json
CHANGED