src/data-processor-chunk.js
function createTmpHashAction(contentHashFields, multiRowFields) {
	let tmpHashFields = [];

	// where there fields from the contentHashFields in the multiRowFields?
	let fieldClash = false;

	// add the original content hash fields to an new array
	// but check that there are not in the multiRowFields.
	for (let i = 0; i < contentHashFields.length; i++) {


		let found = false;
		for (let j = 0; j < multiRowFields.length; j++) {
			if (contentHashFields[i] === multiRowFields[j]) {
				found = true;
				continue;
			}
		}

		if (found) {
			fieldClash = true;
		} else {
			tmpHashFields.push(contentHashFields[i]);
		}
	}

	// now we have a new array
	if (fieldClash) {
		// only in this case we need a separate hash
		return createHashFunction(tmpHashFields, TMP_HASH_FIELD_NAME);
	} else {
		// In this case we could use the normal content hash as the muti row fields where not included
		return;
	}
}
function createTmpHashAction(contentHashFields, multiRowFields) {
	let tmpHashFields = [];

	// where there fields from the contentHashFields in the multiRowFields?
	let fieldClash = false;

	// add the original content hash fields to an new array
	// but check that there are not in the multiRowFields.
	for (let i = 0; i < contentHashFields.length; i++) {


		let found = false;
		for (let j = 0; j < multiRowFields.length; j++) {
			if (contentHashFields[i] === multiRowFields[j]) {
				found = true;
				continue;
			}
		}

		if (found) {
			fieldClash = true;
		} else {
			tmpHashFields.push(contentHashFields[i]);
		}
	}

	// now we have a new array
	if (fieldClash) {
		// only in this case we need a separate hash
		return createHashFunction(tmpHashFields, TMP_HASH_FIELD_NAME);
	} else {
		// In this case we could use the normal content hash as the muti row fields where not included
		return;
	}
}
function createTmpHashAction ( contentHashFields , multiRowFields ) { let tmpHashFields = [ ] ; // where there fields from the contentHashFields in the multiRowFields? let fieldClash = false ; // add the original content hash fields to an new array // but check that there are not in the multiRowFields. for ( let i = 0 ; i < contentHashFields . length ; i ++ ) { let found = false ; for ( let j = 0 ; j < multiRowFields . length ; j ++ ) { if ( contentHashFields [ i ] === multiRowFields [ j ] ) { found = true ; continue ; } } if ( found ) { fieldClash = true ; } else { tmpHashFields . push ( contentHashFields [ i ] ) ; } } // now we have a new array if ( fieldClash ) { // only in this case we need a separate hash return createHashFunction ( tmpHashFields , TMP_HASH_FIELD_NAME ) ; } else { // In this case we could use the normal content hash as the muti row fields where not included return ; } }
Creates a hash function to compute a content hash without the multirow fields
Creates a hash function to compute a content hash without the multirow fields