From 904749038c6d892cfda6fad7513d80669da794c1 Mon Sep 17 00:00:00 2001 From: Jesse Hallett Date: Tue, 24 Sep 2024 11:59:58 -0700 Subject: [PATCH] map `in` ndc operator to mongodb operator --- crates/mongodb-agent-common/src/comparison_function.rs | 4 ++++ fixtures/hasura/test_cases/connector/connector.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/mongodb-agent-common/src/comparison_function.rs b/crates/mongodb-agent-common/src/comparison_function.rs index 09d288ed..34e01f99 100644 --- a/crates/mongodb-agent-common/src/comparison_function.rs +++ b/crates/mongodb-agent-common/src/comparison_function.rs @@ -16,6 +16,8 @@ pub enum ComparisonFunction { Equal, NotEqual, + In, + Regex, /// case-insensitive regex IRegex, @@ -33,6 +35,7 @@ impl ComparisonFunction { C::GreaterThanOrEqual => "_gte", C::Equal => "_eq", C::NotEqual => "_neq", + C::In => "_in", C::Regex => "_regex", C::IRegex => "_iregex", } @@ -45,6 +48,7 @@ impl ComparisonFunction { C::GreaterThan => "$gt", C::GreaterThanOrEqual => "$gte", C::Equal => "$eq", + C::In => "$in", C::NotEqual => "$ne", C::Regex => "$regex", C::IRegex => "$regex", diff --git a/fixtures/hasura/test_cases/connector/connector.yaml b/fixtures/hasura/test_cases/connector/connector.yaml index 0d6604cd..d54b4c4a 100644 --- a/fixtures/hasura/test_cases/connector/connector.yaml +++ b/fixtures/hasura/test_cases/connector/connector.yaml @@ -1,5 +1,5 @@ kind: Connector -version: v1 +version: v2 definition: name: test_cases subgraph: test_cases