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

Reading the tree #39

Closed
miracle2k opened this issue Apr 18, 2015 · 4 comments
Closed

Reading the tree #39

miracle2k opened this issue Apr 18, 2015 · 4 comments

Comments

@miracle2k
Copy link

Maybe I misunderstand, but the only method that I see for actually reading the tree, BaseNestedSets.get_tree, doesn't actually use the MPTT information, but simply executes a lot of queries.

I'd love to see some helpers for actually querying the tree.

@uralbash uralbash added the bug label Apr 20, 2015
@uralbash uralbash added this to the sqlalchemy_mptt v0.1.1 milestone Apr 20, 2015
@uralbash
Copy link
Owner

Yes, you're right, this function uses recursion, which creates a lot of queries to the database, shame on me. I'll try to fix it in the next version.

@uralbash
Copy link
Owner

Well, I fixed function get_tree. Now it run only one query to the database and work faster. Please check it out from master branch. If everything is OK, then I close the task.

@miracle2k
Copy link
Author

That was quick, very cool. Thanks a lot!

@uralbash
Copy link
Owner

Fine, then I close this task. In the future, it will be in 0.1.1 version on PyPi. Thanks for response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants