-
Notifications
You must be signed in to change notification settings - Fork 58
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
Exposing the query builder #87
Comments
Good call. We're doing that for RethinkDB already where |
Sounds great, thanks! |
This is done in 2.6.0. Documentation can be found in https://docs.feathersjs.com/v/auk/databases/knexjs.html#customizing-the-query |
Following on this, in order to be able to make joins, Ex:
What do you guys think ? |
@shadowRR Makes sense. Can you submit a PR? |
Yes, no problem. After further testing, only |
@shadowRR could you show me an example of how to do a join using the createQuery function? Cannot make it work. Thanks in advance. |
@roelvan can you post an error message? |
I'm trying to figure out how to access the query builder object instead of the resolved promise containing row data that's returned by
.find()
.I'm using this lib vs. my own 'raw' knex connection to map feathers' query operators, and its handling of pagination, etc. At the same time, I often need more granular access to what's returned in a typical
.find
-- left joins, mapping hasMany relationships, scoping SQL to a transaction, etc.It'd be super handy to have a generic query method that could return the QB instead of the raw results... is there a best practice for doing that?
The text was updated successfully, but these errors were encountered: