Closed katerinagreif closed 5 years ago
Hi, Played with it and solved by adding:
types.VARCHAR: [EQ, NE, LIKE, ILIKE, REGEXP, IN, NOT_IN], types.NVARCHAR: [EQ, NE, LIKE, ILIKE, REGEXP, IN, NOT_IN],
to filters.py, thinking of using this as a demo, can create branch, if you would like.
I updated the algorithm works with ALLOWED_FILTERS
. Now the column type can be a subclass of the existing types (ALLOWED_FILTERS
keys). This made ALLOWED_FILTERS
more simple.
The new variable EXTRA_ALLOWED_FILTERS also allows you to register new column types.
Thanks, works.
Hi, would it be possible to include mssql types as well as potsgreSQL?When my data is in MS SQL database it throws an error using declerativebase in SQL alchemy if I try to make a filter on variable that isn't converted into SQLalchemy type. Here is the error:
File "\venv\lib\site-packages\graphene_sqlalchemy_filter\filters.py", line 359, in _generate_default_filters expressions = filters_map[column_type.__class__].copy() KeyError: <class 'sqlalchemy.sql.sqltypes.NVARCHAR'>