Skip to content

Commit c045003

Browse files
committed
Add the AVG aggregate function
1 parent 5e2367b commit c045003

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/tink/sql/expr/Functions.hx

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class Functions {
2121
public static function min<D,O>(e:Field<D,O>):Expr<D>
2222
return ECall('MIN', cast [e], VTypeOf(e));
2323

24+
public static function avg<D,O>(e:Field<D,O>):Expr<D>
25+
return ECall('AVG', cast [e], VTypeOf(e));
26+
2427
public static function stContains<T>(g1:Expr<Geometry>, g2:Expr<Geometry>):Expr<Bool>
2528
return ECall('ST_Contains', cast [g1, g2], VBool);
2629

0 commit comments

Comments
 (0)