/// <summary> /// Apply the query modifiers to the query result table /// </summary> internal static DataTable ApplyModifiers(RDFConstructQuery query, DataTable table) { String tablenameBak = table.TableName; //Apply the DISTINCT modifier table = new RDFDistinctModifier().ApplyModifier(table); //Apply the OFFSET modifier table = query.Modifiers.Where(m => m is RDFOffsetModifier) .Aggregate(table, (current, modifier) => modifier.ApplyModifier(current)); //Apply the LIMIT modifier table = query.Modifiers.Where(m => m is RDFLimitModifier) .Aggregate(table, (current, modifier) => modifier.ApplyModifier(current)); table.TableName = tablenameBak; return(table); }
/// <summary> /// Apply the query modifiers to the query result table /// </summary> internal static DataTable ApplyModifiers(RDFDescribeQuery query, DataTable table) { String tablenameBak = table.TableName; //Apply the DISTINCT modifier table = new RDFDistinctModifier().ApplyModifier(table); //Apply the OFFSET modifier table = query.Modifiers.Where(m => m is RDFOffsetModifier) .Aggregate(table, (current, modifier) => modifier.ApplyModifier(current)); //Apply the LIMIT modifier table = query.Modifiers.Where(m => m is RDFLimitModifier) .Aggregate(table, (current, modifier) => modifier.ApplyModifier(current)); table.TableName = tablenameBak; return table; }