lib/newsql.js
function  collectFilterColumns(dftTable, filter, col)  {
	var  isLogical = false;
	if (filter.op === 'AND' || filter.op === 'and' || filter.op === 'OR' || filter.op === 'or')  {
		filter.op = filter.op.toLowerCase();
		isLogical = true;
	}

	if (isLogical)  {
		filter.filters.forEach(function(f) {
			collectFilterColumns(dftTable, f, col);
		});
	}
	else  {
		var  colName = filter.field || filter.name,
			 fc = {tbName: dftTable, col: colName, orig: colName},
			 idx = colName.indexOf('.');

		if (idx > 0)  {
			fc.tbName = colName.substring(0, idx);
			fc.col = colName.substring(idx+1);
		}

		if (_.findIndex(col, fc) < 0)
			col.push(fc);
	}
}
function  collectFilterColumns(dftTable, filter, col)  {
	var  isLogical = false;
	if (filter.op === 'AND' || filter.op === 'and' || filter.op === 'OR' || filter.op === 'or')  {
		filter.op = filter.op.toLowerCase();
		isLogical = true;
	}

	if (isLogical)  {
		filter.filters.forEach(function(f) {
			collectFilterColumns(dftTable, f, col);
		});
	}
	else  {
		var  colName = filter.field || filter.name,
			 fc = {tbName: dftTable, col: colName, orig: colName},
			 idx = colName.indexOf('.');

		if (idx > 0)  {
			fc.tbName = colName.substring(0, idx);
			fc.col = colName.substring(idx+1);
		}

		if (_.findIndex(col, fc) < 0)
			col.push(fc);
	}
}
function collectFilterColumns ( dftTable , filter , col ) { var isLogical = false ; if ( filter . op === 'AND' || filter . op === 'and' || filter . op === 'OR' || filter . op === 'or' ) { filter . op = filter . op . toLowerCase ( ) ; isLogical = true ; } if ( isLogical ) { filter . filters . forEach ( function ( f ) { collectFilterColumns ( dftTable , f , col ) ; } ) ; } else { var colName = filter . field || filter . name , fc = { tbName : dftTable , col : colName , orig : colName } , idx = colName . indexOf ( '.' ) ; if ( idx > 0 ) { fc . tbName = colName . substring ( 0 , idx ) ; fc . col = colName . substring ( idx + 1 ) ; } if ( _ . findIndex ( col , fc ) < 0 ) col . push ( fc ) ; } }
Check if a filter contains json-columns
Check if a filter contains json - columns