File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ internal fun exprToValue(expr: Expr): Value {
4949
5050interface Projectable
5151
52+ internal class ExprWithAlias internal constructor(val alias : String , val expr : Expr ) : Projectable
53+
5254interface Expr {
5355 // Infix functions returning Function subclasses
5456 infix fun equal (other : Expr ) = Equal (this , other)
@@ -143,6 +145,10 @@ interface Expr {
143145 fun descending (): Ordering {
144146 return Ordering (this , Direction .DESCENDING )
145147 }
148+
149+ fun asAlias (alias : String ): Projectable {
150+ return ExprWithAlias (alias, this )
151+ }
146152}
147153
148154// Convenient class for internal usage
Original file line number Diff line number Diff line change @@ -104,10 +104,15 @@ internal constructor(
104104 }
105105 }
106106
107- class FindNearestOptions (val limit : Long , val output : Field ? = null ) {
107+ class FindNearestOptions internal constructor(
108+ val limit : Long ,
109+ val distanceMeasure : DistanceMeasure ,
110+ val output : Field ? = null
111+ ) {
108112 companion object {
109113 @JvmStatic
110- fun newInstance (limit : Long , output : Field ? = null) = FindNearestOptions (limit, output)
114+ fun newInstance (limit : Long , distanceMeasure : DistanceMeasure , output : Field ? = null) =
115+ FindNearestOptions (limit, distanceMeasure, output)
111116 }
112117 }
113118}
You can’t perform that action at this time.
0 commit comments