Selaa lähdekoodia

Added string concat aggregate

Kenric Nugteren 1 vuosi sitten
vanhempi
commit
3021bec6a7
2 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 2 1
      InABox.Core/Aggregate.cs
  2. 1 0
      inabox.database.sqlite/SQLiteProvider.cs

+ 2 - 1
InABox.Core/Aggregate.cs

@@ -70,7 +70,8 @@ namespace InABox.Core
         Count,
         Count,
         Maximum,
         Maximum,
         Minimum,
         Minimum,
-        Average
+        Average,
+        Concat
     }
     }
 
 
     public interface ICoreAggregate<TType, TProp>
     public interface ICoreAggregate<TType, TProp>

+ 1 - 0
inabox.database.sqlite/SQLiteProvider.cs

@@ -1603,6 +1603,7 @@ namespace InABox.Database.SQLite
                 AggregateCalculation.Maximum => "MAX",
                 AggregateCalculation.Maximum => "MAX",
                 AggregateCalculation.Minimum => "MIN",
                 AggregateCalculation.Minimum => "MIN",
                 AggregateCalculation.Average => "AVERAGE",
                 AggregateCalculation.Average => "AVERAGE",
+                AggregateCalculation.Concat => "GROUP_CONCAT",
                 _ => throw new Exception(string.Format("{0}.{1} is not a valid aggregate", columnname, attribute.Calculator.GetType().Name)),
                 _ => throw new Exception(string.Format("{0}.{1} is not a valid aggregate", columnname, attribute.Calculator.GetType().Name)),
             };
             };
         }
         }