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

Try to merge the get_highest_level_cards() and get_next_level_cards() #12

Open
dallaszkorben opened this issue Mar 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dallaszkorben
Copy link
Owner

In the
get_highest_level_cards() and
get_next_level_cards()
functions in the database.py there is only one difference in the database query:

in the get_highest_level_cards() it takes the highest level (or the specified level) from the recursive list
-------------------
-------------------
--- Conditional ---
--- filter ---
-------------------
-------------------

    --- if :level is set, then takes that specific level as highest level
    --- if :level is NOT set, then takes the highest level
    CASE
        WHEN :level IS NULL THEN id_higher_card IS NULL ELSE level = :level
    END

in the get_next_level_cards() it takes the one which has the given id as parent
-------------------
-------------------
--- Conditional ---
--- filter ---
-------------------
-------------------

    id_higher_card = :card_id
@dallaszkorben dallaszkorben added the enhancement New feature or request label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant