-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add native queries, functions or virtual collections defined by pipel…
…ines (#45) Implements native queries. They are defined as aggregation pipelines. If the root target of a query request is a native query then the given pipeline will form the start of the overall query plan pipeline. In this case the query will be executed as a MongoDB `aggregate` command with no target collection - as opposed to our other queries which are an `aggregate` command that *does* have a collection target. Native queries currently cannot be the target of a relation. There is a really basic native query in fixtures to test with. If you run services with `arion up -d` you can see it as a query field called `hello`. The changes were going to result in a large-ish amount of very similar, but technically incompatible code involving converting configuration to ndc types for schema responses, and for processing query requests. To avoid that I pushed configuration processing into the `configuration` crate. This makes it easier to share that logic, pushes a bunch of errors from connector runtime to configuration parsing time, and pushes computation to connector startup time instead of response-handling time. This resulted in a bunch of changes: - The `MongoConfig` type is gone. Instead configuration-related data is kept in `Configuration` which is now passed directly to `mongodb-agent-common` functions. Database-connection data is put in a new type, `ConnectorState`. So now we have properly separated configuration and state types, which is what the ndc-sdk API expects. - The `configuration` crate has a new dependency on `ndc-models`. We need to keep the `ndc-models` version matched with `ndc-sdk`. To make that easier I moved configuration for those dependencies to the workspace `Cargo.toml` and added a note.
- Loading branch information
Showing
60 changed files
with
2,136 additions
and
1,206 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.