-
Notifications
You must be signed in to change notification settings - Fork 288
Nested Filtering For MsSql Design #957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fixes from proof reading
aaronburtle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just had one question about pagination.
ayush3797
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat! LGTM!
aaronburtle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
…#975) ## Why make this change? - This is a precursor to #825 the design for which is discussed in #957. - It is purely a refactor necessary to write a recursive graphql filter parser for SQL. ## What is this change? - Although many files seem to be changed, main file to focus on is `GQLFilterParser`. - Change the input arguments for `GQLFilterParser`.`Parse` to include a `BaseQueryStructure` so that it can be called recursively for nested filters both for SQL and Cosmos. Currently, used only for `Cosmos` by setting the `DatabaseObject.Name` to `parentSourceName.NestedFilterFieldname` before each recursive call. Eventually resetting to `_containerAlias` once back to the first caller in `CosmosQueryEngine` - With this modification, moved some of the properties from `BaseSqlQueryStructure` to the base class `BaseQueryStructure` which are useful for Cosmos too : + `EntityName` = the entity name from the config, + `SourceAlias` = the alias of the main entity being filtered used in the query that's generated (renamed from `TableAlias`). Is the `containerAlias` on the first instance of the call for Cosmos. + `MetadataProvider` = either the Sql or Cosmos metadata provider (renamed from `SqlMetadataProvider`) + `DatabaseObject` = has the schema name and source name + `AuthorizationResolver` = useful to add DbPolicyPredicates for any of the entities used in the nested filter - Make `GQLFilterParser` a singleton service dependent on `ISqlMetadataProvider` since we will (in a future PR) use the information from the `MetadataProvider` to obtain `DatabaseObject` of the nested entity. - Constructor modifications to trickle the `GQLFilterParser` and `AuthorizationResolver` to the `BaseQueryStructure` ## How was this tested? - Existing tests since this is only a refactor, no change in functionality.
Why make this change?
What is this change?
How was this tested?
To Do
Investigate similar queries for PgSql, MySql