Skip to content
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

Nested db requests #60

Open
jackherizsmith opened this issue May 29, 2020 · 2 comments
Open

Nested db requests #60

jackherizsmith opened this issue May 29, 2020 · 2 comments
Labels
code review enhancement New feature or request

Comments

@jackherizsmith
Copy link

You have nested db queries in your crewHandler.js (like us!) it might be worth looking into which ones you could fully do in the model - i.e. write on DB query that returns everything you need in one go.

SQLFiddle is great for testing complex queries.

@jackherizsmith jackherizsmith added code review enhancement New feature or request labels May 29, 2020
@jamesj-0
Copy link
Collaborator

Wicked! Thanks for sharing this :)

@akomiqaia
Copy link
Collaborator

I think we might need some clarification Jack. we have to tables crew and cast and they are not connected to each other. Maybe they can become one table but that would take time to rearrange all the queries and schema structure. in crewModels.js we are making to separate queries to two different tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code review enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants