Enables tests from TestJSONFields which were disabled previously by mistake. Apparently if you stack @test.requireCapability(dialect="mysql") and @test.requireCapability(dialect="postgres") on top of each other, the test will not run for neither mysql or postgres
Fixes JSON array referencing which seems to have been broken for a while, e.g. Model.filter(data__filter={"names_0": "John"})
Updates the docs
Motivation and Context
JSON and JSONB fields are very popular with people who use Postgres. It makes sense to support a range of JSON operations. Django offers similar functionality.
Description
This PR:
filter
lookup types such asin
,not_in
,gt
,lt
, etc. This is based on changes from https://github.com/tortoise/tortoise-orm/pull/1215TestJSONFields
which were disabled previously by mistake. Apparently if you stack@test.requireCapability(dialect="mysql")
and@test.requireCapability(dialect="postgres")
on top of each other, the test will not run for neither mysql or postgresModel.filter(data__filter={"names_0": "John"})
Motivation and Context
JSON and JSONB fields are very popular with people who use Postgres. It makes sense to support a range of JSON operations. Django offers similar functionality.
Related issues:
How Has This Been Tested?
Added more tests and enabled the existing ones.
Checklist: