source/Stricture-Run-Prepare.js
function(pModel)
{
	// First create a "lookup" of primary keys that point back to tables
	console.log('--> ... creating contextual Index ==> Table lookups ...');
	var tmpIndices = {};
	for(var tmpTable in pModel.Tables)
	{
		for (var j = 0; j < pModel.Tables[tmpTable].Columns.length; j++)
		{
			if (pModel.Tables[tmpTable].Columns[j].DataType == "ID")
			{
				console.log('  > Adding the table '+pModel.Tables[tmpTable].TableName+' to the lookup cache with the key '+pModel.Tables[tmpTable].Columns[j].Column);
				tmpIndices[pModel.Tables[tmpTable].Columns[j].Column] = pModel.Tables[tmpTable].TableName;
			}
		}
	}
	console.log('  > indices built successfully.');
	return tmpIndices;
}
function(pModel)
{
	// First create a "lookup" of primary keys that point back to tables
	console.log('--> ... creating contextual Index ==> Table lookups ...');
	var tmpIndices = {};
	for(var tmpTable in pModel.Tables)
	{
		for (var j = 0; j < pModel.Tables[tmpTable].Columns.length; j++)
		{
			if (pModel.Tables[tmpTable].Columns[j].DataType == "ID")
			{
				console.log('  > Adding the table '+pModel.Tables[tmpTable].TableName+' to the lookup cache with the key '+pModel.Tables[tmpTable].Columns[j].Column);
				tmpIndices[pModel.Tables[tmpTable].Columns[j].Column] = pModel.Tables[tmpTable].TableName;
			}
		}
	}
	console.log('  > indices built successfully.');
	return tmpIndices;
}
function ( pModel ) { // First create a "lookup" of primary keys that point back to tables console . log ( '--> ... creating contextual Index ==> Table lookups ...' ) ; var tmpIndices = { } ; for ( var tmpTable in pModel . Tables ) { for ( var j = 0 ; j < pModel . Tables [ tmpTable ] . Columns . length ; j ++ ) { if ( pModel . Tables [ tmpTable ] . Columns [ j ] . DataType == "ID" ) { console . log ( '  > Adding the table ' + pModel . Tables [ tmpTable ] . TableName + ' to the lookup cache with the key ' + pModel . Tables [ tmpTable ] . Columns [ j ] . Column ) ; tmpIndices [ pModel . Tables [ tmpTable ] . Columns [ j ] . Column ] = pModel . Tables [ tmpTable ] . TableName ; } } } console . log ( '  > indices built successfully.' ) ; return tmpIndices ; }
Generate a lookup object that contains the identity key pointing to a table name
Generate a lookup object that contains the identity key pointing to a table name