Skip to content

Commit

Permalink
(V1.0.0) Code cleanups;
Browse files Browse the repository at this point in the history
  • Loading branch information
mdesalvo committed Jan 5, 2017
1 parent f9d9b65 commit 254583f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions RDFSharp/Query/RDFQueryEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ internal static void EvaluatePatterns(RDFQuery query, RDFPatternGroup patternGro
query.PatternResultTables[patternGroup] = new List<DataTable>();

//Iterate over the patterns of the pattern group
foreach(RDFPattern pattern in patternGroup.Patterns) {
foreach (var pattern in patternGroup.Patterns) {

//Apply the pattern to the graph/store
DataTable patternResultsTable = graphOrStore.IsGraph() ? ApplyPattern(pattern, (RDFGraph)graphOrStore) : ApplyPattern(pattern, (RDFStore)graphOrStore);
var patternResultsTable = graphOrStore.IsGraph() ? ApplyPattern(pattern, (RDFGraph)graphOrStore) :
ApplyPattern(pattern, (RDFStore)graphOrStore);

//Set the name and the optionality metadata of the result datatable
patternResultsTable.TableName = pattern.ToString();
patternResultsTable.TableName = pattern.ToString();
patternResultsTable.ExtendedProperties.Add("IsOptional", pattern.IsOptional);
patternResultsTable.ExtendedProperties.Add("JoinAsUnion", pattern.JoinAsUnion);

Expand Down Expand Up @@ -163,7 +164,7 @@ internal static void CombinePatterns(RDFQuery query, RDFPatternGroup patternGrou
if (patternGroup.Patterns.Any()) {

//Populate pattern group result table
DataTable patternGroupResultTable = CombineTables(query.PatternResultTables[patternGroup], false);
var patternGroupResultTable = CombineTables(query.PatternResultTables[patternGroup], false);

//Add it to the list of pattern group result tables
query.PatternGroupResultTables.Add(patternGroup, patternGroupResultTable);
Expand Down

0 comments on commit 254583f

Please sign in to comment.