File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ final class PipelineTests: FSTIntegrationTestCase {
40
40
func testWhereStage( ) async throws {
41
41
_ = db. pipeline ( ) . collection ( " books " )
42
42
. where (
43
- Field ( " rating " ) > 4.0 && Field ( " genre " ) == " Science Fiction " || ArrayContains (
43
+ Field ( " rating " ) . gt ( 4.0 ) && Field ( " genre " ) . eq ( " Science Fiction " ) || ArrayContains (
44
44
fieldName: " fieldName " ,
45
45
values: " rating "
46
46
)
@@ -327,7 +327,7 @@ final class PipelineTests: FSTIntegrationTestCase {
327
327
}
328
328
329
329
func testBooleanExpr( ) async throws {
330
- let isApple : BooleanExpr = Field ( " type " ) == " apple "
330
+ let isApple : BooleanExpr = Field ( " type " ) . eq ( " apple " )
331
331
332
332
// USAGE: stage where requires an expression of type BooleanExpr
333
333
let allAppleOptions : Pipeline = db. pipeline ( ) . collection ( " fruitOptions " ) . where ( isApple)
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ class PipelineIntegrationTests: FSTIntegrationTestCase {
118
118
let snapshot = try await firestore ( )
119
119
. pipeline ( )
120
120
. collection ( " /foo " )
121
- . where ( Field ( " foo " ) == Constant ( " bar " ) )
121
+ . where ( Field ( " foo " ) . eq ( Constant ( " bar " ) ) )
122
122
. execute ( )
123
123
124
124
print ( snapshot)
Original file line number Diff line number Diff line change @@ -319,8 +319,7 @@ google_firestore_v1_Pipeline_Stage ReplaceWith::to_proto() const {
319
319
return result;
320
320
}
321
321
322
- ReplaceWith::ReplaceWith (std::shared_ptr<Expr> expr)
323
- : expr_(std::move(expr)) {
322
+ ReplaceWith::ReplaceWith (std::shared_ptr<Expr> expr) : expr_(std::move(expr)) {
324
323
}
325
324
326
325
Sample::Sample (std::string type, int64_t count, double percentage)
You can’t perform that action at this time.
0 commit comments