sqlalchemy-filters
sqlalchemy-filters copied to clipboard
Support json_contains in JSON field
Intro
- Add new Operator
json_contains
to support JSON field in mysql5.7 or higher - Add mysql test for
json_contains
and ignoresqlite
andpostgres
- Only support sqlalchemy1.3.x or higher for now
More
- Not sure format is correct for this repo.
- Please let me know if there is something necessary need to add for this PR.
Confused
- Can't find sqlite3 version, and sqlalchemy1.1.x or higher support
JSON
but sqlite will raise an says that:
CompileError: (in table 'til', column 'refer_info'): Compiler <sqlalchemy.dialects.sqlite.base.SQLiteTypeCompiler object at 0x7f045429d9d0> can't render element of type <class 'sqlalchemy.sql.sqltypes.JSON'>
I think the error might be cause by sqlalchemy version and restrict it to 1.3.x or higher then test pass.
but still can't figure out why sqlalchemy1.1 and sqlalchemy1.2 will raise such error with sqlite3, any idea about this?
Thank you @iamdavidzeng for your request!
I will review your changes in the next days.
@juliotrigo thank you for this great package!
Any chance this PR might be merged and released soon? it would be a nice feature