You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for sqlalchemy.dialects.postgresql fields #172
When I try to register a SQLAlchemyNode whose model has a postgres-specific field, I receive the error message Don't know how to convert the SQLAlchemy field [table_name].[field_name] (<class 'sqlalchemy.sql.schema.Column'>). It'd be great if these fields worked out of the box.
TSVECTOR is probably important to mention here if full text search is needed. Not sure if an implementation is required but at least exclude the field by default as it would probably only used in the resolve method to search.
@dgouldin I've added all this fields to sqlalchemy converters, I still need to make some tests before pull request but my fork is up to date if you need to test it
Activity
syrusakbary commentedon May 20, 2016
That could be a good idea.
It this field type inside sqlalchemy, or in a third party library?
dgouldin commentedon May 20, 2016
Inside sqlalchemy. It's an entire module of fields. Types listed in the docs starting here:
http://docs.sqlalchemy.org/en/latest/dialects/postgresql.html#array-types
karec commentedon Jun 7, 2016
👍
Some fields could be really simple to implement within the existing code, I will try to work on it this week if I have some times.
It could be nice to define a list for all fields that we need to add
dgouldin commentedon Jun 7, 2016
ARRAY,JSON,JSONB,HSTORE,ENUM, andUUIDare IMO the most common postgres-specific types.tgdn commentedon Jun 19, 2016
TSVECTORis probably important to mention here if full text search is needed. Not sure if an implementation is required but at least exclude the field by default as it would probably only used in the resolve method to search.first try to add postgresql specific fields to sqlachemy converters ref
add unit tests for new converters graphql-python#172
add postgresql specific data for examples graphql-python#172
add specific columns for postgresql dialect graphql-python#172
karec commentedon Jun 21, 2016
@dgouldin I've added all this fields to sqlalchemy converters, I still need to make some tests before pull request but my fork is up to date if you need to test it
syrusakbary commentedon Sep 11, 2016
Postgresql SQLAlchemy field conversion is now available in
1.0.dev(master branch).Closing the issue!
patvdleer commentedon Jun 6, 2018
Due a wrapper (for JSONB on Sqlite) I wrote (and stole/copied) I ran into the same error. Maybe this will help others.