Open CK-Yong opened 2 years ago
We could also use a whitelist, like this:
BuildResult<FilterDefinition<MyDocument>> result = FilterBuilder
.FromString("MyProperty=bar")
.UseAdapter(new MongoFilterAdapter<MyDocument>())
.UseWhiteList(x => x.Foo, x => x.Bar, x => x.FooBar)
.Build();
Where the parameters would just be a list of properties to allow querying on.
Should still add functionality for blocking operators.
AIP-160 specifies the following:
We should be able to either limit or inform the consumers of the package which operators or comparables were parsed.
For example, by wrapping the build result before it can be used, we can do some validation.