<commit_before>$sqlInstance = "(local)\SQL2014";
$dbName = "R2RMLTestStore";

function Update-Config 
{
	$mssqlConnectionString = "Server=$sqlInstance; Database=$dbName; Trusted_connection=true";
	
	foreach($o in $input) 
	{
		Write-output ('Updating ' + $o.FullName)
	
		$doc = (Get-Content $o.FullName) -as [xml];
		$node = $doc.SelectSingleNode('//connectionStrings/add[@name="mssql_connection"]');
		
		if($node) 
		{
			Write-output ('Updating MSSQL ConnectionString to: ' + $mssqlConnectionString);
			$node.connectionString = $mssqlConnectionString;	
		}
		
		$doc.Save($o.FullName);
	}
	
	
}

$env:APPVEYOR_BUILD_FOLDER | get-childitem -recurse |? {$_.Name -eq "app.config"} | Update-Config;

Write-output ('Creating database ' + $dbName);
sqlcmd -S "$sqlInstance" -Q "Use [master]; CREATE DATABASE [$dbName]";<commit_msg>Update beforetest.ps1<commit_after>$sqlInstance = "(local)\SQL2014";
$dbName = "R2RMLTestStore";

function Update-Config 
{
	$mssqlConnectionString = "Data Source=$sqlInstance;Initial Catalog=$dbName;Integrated Security=True";
	
	foreach($o in $input) 
	{
		Write-output ('Updating ' + $o.FullName)
	
		$doc = (Get-Content $o.FullName) -as [xml];
		$node = $doc.SelectSingleNode('//connectionStrings/add[@name="mssql_connection"]');
		
		if($node) 
		{
			Write-output ('Updating MSSQL ConnectionString to: ' + $mssqlConnectionString);
			$node.connectionString = $mssqlConnectionString;	
		}
		
		$doc.Save($o.FullName);
	}
	
	
}

$env:APPVEYOR_BUILD_FOLDER | get-childitem -recurse |? {$_.Name -eq "app.config"} | Update-Config;

Write-output ('Creating database ' + $dbName);
sqlcmd -S "$sqlInstance" -Q "Use [master]; CREATE DATABASE [$dbName]";
{'fraction_non_alphanumeric': 0.1673615247170935, 'fraction_numerical': 0.006551518761167362, 'mean_word_length': 4.833333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1523964', 'n_tokens_mistral': 660, 'n_tokens_neox': 594, 'n_words': 107}