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

Refactor converter.js #14

Open
kirrg001 opened this issue Nov 15, 2018 · 0 comments
Open

Refactor converter.js #14

kirrg001 opened this issue Nov 15, 2018 · 0 comments

Comments

@kirrg001
Copy link
Contributor

kirrg001 commented Nov 15, 2018

Problem

We are currently adding support for filtering on relations.

With every case, the converter becomes:

  • harder to read
  • a little bit hacky to fulfil the cases

Reasons

  • everything lives in one file
  • the relation cases are quite challenging, the complexity is high

Goal

Try to add all relation cases and then refactor the converter.js.
We should first learn from the use cases and see which refactoring direction makes sense.

I think what we need is a detection in the code base what this case is and then react on it.
Currently, the converter.js is too generic, which makes it hard to deal with all the cases.
IMO be explicit and more readable.

kirrg001 referenced this issue in TryGhost/mongo-knex Nov 15, 2018
closes #14

- the code becomes a little hard to read, but i'd not refactor it till we have all cases in place
- this commit supports the cases listed in #14 
- i've raised #17 to refactor the converter.js
@daniellockyer daniellockyer transferred this issue from TryGhost/mongo-knex Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant