Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whitglint/ltreefield
Django Field class for PostgreSQL ltree data type.
https://github.com/whitglint/ltreefield
django-field ltree postgresql
Last synced: 24 days ago
JSON representation
Django Field class for PostgreSQL ltree data type.
- Host: GitHub
- URL: https://github.com/whitglint/ltreefield
- Owner: whitglint
- License: mit
- Created: 2014-12-14T05:03:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-14T05:56:47.000Z (almost 10 years ago)
- Last Synced: 2024-08-04T04:04:27.074Z (4 months ago)
- Topics: django-field, ltree, postgresql
- Language: Python
- Size: 1.11 MB
- Stars: 16
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - ltreefield - Django Field class for PostgreSQL ltree data type. (Python)
README
ltreefield
==========Django Field class for PostgreSQL ltree data type.
Class
-----
LtreeFieldLookups
-------
* aore
* ltree @> ltree
* is left argument an ancestor of right (or equal)?
* dore
* ltree <@ ltree
* is left argument a descendant of right (or equal)?
* match
* ltree ~ lquery
* does ltree match lquery?Usage
-----
```python
path__aore='Top.Science' # path @> 'Top.Science'
path__dore='Top.Science' # path <@ 'Top.Science'
path__match='*.Astronomy.*' # path ~ '*.Astronomy.*'
```Reference
---------
[PostgreSQL: Documentation: 9.3: ltree](http://www.postgresql.org/docs/9.3/static/ltree.html)