Skip to content

Commit 673d8be

Browse files
Revise note and add comparison section in README
Updated the note for clarity and added a comparison section between HStoreField and JSONField.
1 parent a237e6c commit 673d8be

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
> [!NOTE]
5-
If you want a field based implementation, please check [django-hstore-field](https://github.com/baseplate-admin/django-hstore-field). The package builds on top of this to give an ergonomic implementation.
5+
If you are new to `hstore`, please check [django-hstore-field](https://github.com/baseplate-admin/django-hstore-field). The package builds on top of this to give an ergonomic implementation.
66

77

88
[![Downloads](https://static.pepy.tech/badge/django-hstore-widget)](https://pepy.tech/project/django-hstore-widget) [![CI](https://github.com/baseplate-admin/django-hstore-widget/actions/workflows/CI.yml/badge.svg)](https://github.com/baseplate-admin/django-hstore-widget/actions/workflows/test.yml) [![Pypi Badge](https://img.shields.io/pypi/v/django-hstore-widget.svg)](https://pypi.org/project/django-hstore-widget/) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/baseplate-admin/django-hstore-widget/master.svg)](https://results.pre-commit.ci/latest/github/baseplate-admin/django-hstore-widget/master)
@@ -66,3 +66,21 @@ class YourmodelAdmin(admin.ModelAdmin):
6666
## Result
6767

6868
![Rendered result](./assets/rendered.png)
69+
70+
## Comparison
71+
72+
### Vs `JSONB`
73+
74+
| Feature | `HStoreField` | `JSONField` |
75+
| --------------------------------- | ------------- | ----------- |
76+
| Requires PostgreSQL extension |||
77+
| Flat key–value support |||
78+
| Nested structure support |||
79+
| Supports non-string values |||
80+
| Simple key-value admin UI |||
81+
| Easy validation |||
82+
| Advanced JSON queries |||
83+
| Powerful containment queries |||
84+
| Smaller storage footprint |||
85+
| Suitable for metadata fields |||
86+
| Suitable for structured documents |||

0 commit comments

Comments
 (0)