-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Execute raw NoSQL queries (e.g. MongoDB) #3342
Comments
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
Suggestion
As I wrote in #2807 (comment), it is possible to execute raw SQL queries using the recently introduced
Repository
methodexecute
, see #2681. This works great for SQL connectors.Unfortunately, this method does not work for MongoDB and possibly for other NoSQL connectors that require more than just a
command
string andargs
array.We need to find a way how to improve LB4 API, MongoDB connector API or both, to make it easy to execute raw MongoDB commands.
Related code:
Use Cases
aggregate
query, see How to execute raw MongoDB queries #2807, How can i use mongodb aggregate with lb4? #2021Examples
Acceptance criteria
Improve the typedef signatures for
execute
possibly with some overloading on both repository classes in LB4 (feat(repository): add support for non-SQL variants ofRepository.execute()
#6030) and datasource classes in Juggler (see types: support non-SQL styles ofds.execute
loopback-datasource-juggler#1855)Add API docs on repository classes in LB4 (feat(repository): add support for non-SQL variants of
Repository.execute()
#6030) and datasource classes in Juggler (see types: support non-SQL styles ofds.execute
loopback-datasource-juggler#1855)Create a new page about the
execute
method under https://loopback.io/doc/en/lb4/Working-with-data.html. Mention the connectors that supports theexecute
method (see Add documentation for executing native database commands #6047)Add details about
execute
method on relevant pages under https://loopback.io/doc/en/lb4/Database-connectors.html.See also Add documentation for executing native database commands #6047 (review):
Add tests to ensure raw NoSQL queries are executing as expected for MongoDB (see test: add acceptance-level tests for
repository.execute()
#6046)Investigate why the acceptance test is failing for PostgreSQL and fix the problem, see test: add acceptance-level tests for
repository.execute()
#6046 (comment)The text was updated successfully, but these errors were encountered: