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 CHANGED
@@ -6,11 +6,11 @@ Backend for the anti Pareto rule.
6
6
 
7
7
 
8
8
  ![stable](https://img.shields.io/badge/stability-stable-blue.svg)
9
- [![npm-version](https://img.shields.io/npm/v/backend-star.svg)](https://npmjs.org/package/backend-star)
10
- [![downloads](https://img.shields.io/npm/dm/backend-star.svg)](https://npmjs.org/package/backend-star)
11
- [![build](https://img.shields.io/travis/codenautas/backend-star/master.svg)](https://travis-ci.org/codenautas/backend-star)
12
- [![coverage](https://img.shields.io/coveralls/codenautas/backend-star/master.svg)](https://coveralls.io/r/codenautas/backend-star)
13
- [![dependencies](https://img.shields.io/david/codenautas/backend-star.svg)](https://david-dm.org/codenautas/backend-star)
9
+ [![npm-version](https://img.shields.io/npm/v/backend-plus.svg)](https://npmjs.org/package/backend-plus)
10
+ [![downloads](https://img.shields.io/npm/dm/backend-plus.svg)](https://npmjs.org/package/backend-plus)
11
+ [![build](https://img.shields.io/travis/codenautas/backend-plus/master.svg)](https://travis-ci.org/codenautas/backend-plus)
12
+ [![coverage](https://img.shields.io/coveralls/codenautas/backend-plus/master.svg)](https://coveralls.io/r/codenautas/backend-plus)
13
+ [![dependencies](https://img.shields.io/david/codenautas/backend-plus.svg)](https://david-dm.org/codenautas/backend-plus)
14
14
 
15
15
 
16
16
  language: ![English](https://raw.githubusercontent.com/codenautas/multilang/master/img/lang-en.png)
@@ -205,7 +205,7 @@ entry | usage
205
205
  -----------------------------|---------------
206
206
  server |
207
207
  .port | port where is listening
208
- .base-rul | base url added to domain name
208
+ .base-url | base url added to domain name
209
209
  .module-store |
210
210
  install | (see Spanish)
211
211
  .dump | (see Spanish)
@@ -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
  })
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backend-plus",
3
3
  "description": "Backend for the anti Pareto rule",
4
- "version": "2.0.0-rc.5",
4
+ "version": "2.0.0-rc.6",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/backend-plus",