4 ms·
I only hope it won't be too long before various "drivers" and frameworks start supporting it, otherwise the acceptance rate will be too low. And Jsonb deserves
by illuminated 13y ago
I only hope it won't be too long before various "drivers" and frameworks start supporting it, otherwise the acceptance rate will be too low. And Jsonb deserves to be accepted as fast as possible.
- guptaneil 13y agoConsidering Postgres is the first relational database to support jsonb, portability (which is the main benefit of drivers) doesn't really apply. Any decent driver or framework should let you write native psql commands, so you should be able to start using this as soon as it's released.
- illuminated 13y agoBeing able to use Jsonb through a framework and fully utilize it (through it) are not the same things. I will be definitely use it soon, but unless it's fully supported in frameworks (...) it won't be widely accepted.
- lmb 13y agoSeems like there is room for a PostgreSQL-only ORM that specifically makes all these nice features available. Anyone heard of such a thing?
- blakn 13y agoNot exactly a PostgreSQL-only ORM The excellent slick-pg library which extends the FRM library slick. https://github.com/tminglei/slick-pg https://github.com/tminglei/slick-pg
- masklinn 13y agoMost "frameworks"/ORM can provide database-specific features, and it's especially easy for field types. e.g. http://docs.sqlalchemy.org/en/rel_0_9/dialects/postgresql.html#postgresql-data-types http://docs.sqlalchemy.org/en/rel_0_9/dialects/postgresql.ht... (data types local to SQL Alchemy's Postgres dialect) or https://github.com/djangonauts/django-hstore https://github.com/djangonauts/django-hstore (hstore in Django)
- zapov 13y agoNot really an ORM but highly integrated with Postgres: https://github.com/ngs-doo/revenj https://github.com/ngs-doo/revenj
- lucian1900 13y agoThere isn't really a need, though. SQLAlchemy exposes all of SQL, most unique things dialects offer and it makes it very easy to add types too.
- jeltz 13y agoThere are ORMs like SQLAlchemy (Python) and Sequel (Ruby) which try to expose as much as possible of the features of all supported databases. It is common for Sequel to add support for new PostgreSQL features while the new PostgreSQL version is still in beta testing.
- MartinMond 13y agoRails already has support for Postgres' json type, I don't doubt that they'll add jsonb support asap.
- jherdman 13y agoWhat's involved in supporting JSONB in Rails? Given that you probably want access to the entire JSON blob at the Rails level, aren't you good to go already?
- acjohnson55 13y agoSure, but it's also nice to have a layer of abstraction over psql. I personally really enjoy working with Django's ORM, for example, over writing native queries.
- andybak 13y agoTwo new features in 1.7 might make it easy to extend the ORM yourself: https://docs.djangoproject.com/en/dev/ref/models/custom-lookups/#django.db.models.Lookup https://docs.djangoproject.com/en/dev/ref/models/custom-look... https://docs.djangoproject.com/en/dev/ref/models/custom-lookups/#django.db.models.Transform https://docs.djangoproject.com/en/dev/ref/models/custom-look...
- njharman 13y agoAbstraction layers (such as drivers) have significant utility beyond portability.
- masklinn 13y agoI'd suggest opening bugs on drivers (that's the most important one) right now since the feature is officially in the development version. If it doesn't already work that is. That's how it was done for 9.3's expanded diagnostics[0], and as a result both Python's psygopg2[1] and Ruby's ruby-pg[2] (and maybe others) added extended diagnostics support before 9.3 was even released[3], and working from day 1. [0] http://www.depesz.com/2013/03/07/waiting-for-9-3-provide-database-object-names-as-separate-fields-in-error-messages/ http://www.depesz.com/2013/03/07/waiting-for-9-3-provide-dat... [1] http://psycopg.lighthouseapp.com/projects/62710/tickets/149 http://psycopg.lighthouseapp.com/projects/62710/tickets/149 [2] https://bitbucket.org/ged/ruby-pg/issue/161/add-support-for-pg_diag_-_name-error https://bitbucket.org/ged/ruby-pg/issue/161/add-support-for-... [3] http://www.postgresql.org/about/news/1481/ http://www.postgresql.org/about/news/1481/
- sfjailbird 13y agoTeamPostgreSQL, the PostgreSQL web interface, has a JSON builder/editor built in which makes browsing JSON data very nice.
- lamby 13y agoMm, I agree. As an example, historically, Django has been quite weak at this due to its Field.get_internal_type() system.