new(basic.gblib): New batch features.
This commit is contained in:
		
							parent
							
								
									c86934e646
								
							
						
					
					
						commit
						faa21438fa
					
				
					 1 changed files with 9 additions and 5 deletions
				
			
		| 
						 | 
					@ -1170,11 +1170,15 @@ export class SystemKeywords {
 | 
				
			||||||
      if (!t) {
 | 
					      if (!t) {
 | 
				
			||||||
        throw new Error(`TABLE ${file} not found. Check TABLE keywords.`);
 | 
					        throw new Error(`TABLE ${file} not found. Check TABLE keywords.`);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      let res;
 | 
				
			||||||
      const systemFilter = await SystemKeywords.getFilter(args[0]);
 | 
					      if (args[0]) {
 | 
				
			||||||
      let filter = {};
 | 
					        const systemFilter = await SystemKeywords.getFilter(args[0]);
 | 
				
			||||||
      filter[systemFilter.columnName] = systemFilter.value;
 | 
					        let filter = {};
 | 
				
			||||||
      const res = await t.findAll({ where: filter });
 | 
					        filter[systemFilter.columnName] = systemFilter.value;
 | 
				
			||||||
 | 
					        res = await t.findAll({ where: filter });
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        res = await t.findAll();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      return res.length > 1 ? res : res[0];
 | 
					      return res.length > 1 ? res : res[0];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue