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

types: possible to support both JSON/JSONB #19

Closed
lnielsen opened this issue Nov 20, 2015 · 3 comments
Closed

types: possible to support both JSON/JSONB #19

lnielsen opened this issue Nov 20, 2015 · 3 comments

Comments

@lnielsen
Copy link
Member

Currently SQLAlchemy has JSONB support for PostgreSQL:
http://docs.sqlalchemy.org/en/latest/dialects/postgresql.html#sqlalchemy.dialects.postgresql.JSONB

However, it doesn't seem like it will go into JSONType in SQLAlchemy-Utils due to difficulties in making it behave nicely across DBs:
kvesteri/sqlalchemy-utils#125

For Invenio-Records we could likely get along with using JSONB when on PostgreSQL (and stay with text no the other platforms), as all we basically do is get and put the entire JSON so comparators is less of an issue.

@lnielsen
Copy link
Member Author

Ping @jirikuncar @tiborsimko

@lnielsen lnielsen modified the milestones: someday, v1.0.0 Dec 3, 2015
@tiborsimko
Copy link
Member

I'd advocate using JSONB with PostgreSQL when it makes sense, even for operators. A flagship example is the authority control where the management utilities will want to do operations like "what records are dependent on this record to see whether we can safely delete it?" These "management machine queries" ideally operate directly on the raw record store, not on the enhanced JSON in Elasticsearch where JSON references may be expanded. Here, using JSONB dedicated indexes and comparison operators can make a world of difference in performance.

Some references of past musings:

@jirikuncar
Copy link
Member

jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Jun 30, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
@jirikuncar jirikuncar self-assigned this Jun 30, 2016
jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Jun 30, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Jun 30, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Jul 1, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Jul 1, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Jul 1, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Aug 10, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Oct 24, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Oct 24, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Oct 24, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jirikuncar added a commit to jirikuncar/invenio-db that referenced this issue Nov 15, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
hachreak pushed a commit to hachreak/invenio-db that referenced this issue Nov 16, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
hachreak pushed a commit to hachreak/invenio-db that referenced this issue Nov 22, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
hachreak pushed a commit to hachreak/invenio-db that referenced this issue Nov 22, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
hachreak pushed a commit to hachreak/invenio-db that referenced this issue Nov 22, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
hachreak pushed a commit to hachreak/invenio-db that referenced this issue Nov 22, 2016
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
@lnielsen lnielsen modified the milestones: v1.0.0, someday Jul 28, 2017
hachreak pushed a commit to hachreak/invenio-db that referenced this issue Aug 8, 2017
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
hachreak pushed a commit to hachreak/invenio-db that referenced this issue Aug 9, 2017
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
hachreak pushed a commit to hachreak/invenio-db that referenced this issue Aug 9, 2017
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
hachreak pushed a commit to hachreak/invenio-db that referenced this issue Aug 9, 2017
* Adds test for JSON/JSONB fields.  (closes inveniosoftware#19)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants