feincms / django-tree-queries

Adjacency-list trees for Django using recursive common table expressions. Supports PostgreSQL, sqlite, MySQL and MariaDB.
https://django-tree-queries.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
433 stars 27 forks source link

Convert tree fields only #17

Closed SafaAlfulaij closed 3 years ago

SafaAlfulaij commented 3 years ago

This allows using the tree fields in different ways, and doesn't blindly convert them. Although the check is simple for now...

SafaAlfulaij commented 3 years ago

That being said, the representation of tree_path and tree_ordering are documented to be an implementation detail and I'm a bit wary of setting expectations regarding their format. In the future some other database engine may add support for arrays and we'll surely want to change their format then, because arrays seem obviously better for this than a string with separators or something.

I am aware that they are both implementation details, but since this library tries to be as small as possible, people will have to extend it some way or another to add more support for what they need (without resorting to other huge libraries), at the expense of losing it after a breaking update.

matthiask commented 3 years ago

I am aware that they are both implementation details, but since this library tries to be as small as possible, people will have to extend it some way or another to add more support for what they need (without resorting to other huge libraries), at the expense of losing it after a breaking update.

Makes sense. Thank you.