Describe the feature you'd like to request
In the generate model store class or model action, we should be able to specify JSON column key names using dot syntax in filter, and possibly span and sort query inputs.
Describe the solution you'd like
Basic filter syntax example:
filter[references.fbid]=abc123
Should be able to access deep nested keys like the following example:
filter[data.user.name]=john
Should be able to access arrays like the following example:
Should be able to filter by many items in an array like the following example:
filter[tags][]=home&filter[tags][]=work
Should be able to access deep object/arrays like the following example:
filter[chess.board.2.3.white]=pawn
Other query inputs like span and sort should also accept the above examples as well (as it may apply)
Describe alternatives you've considered
- Some DBs like SQLite don’t support JSON columns. In this case we just ignore these kind of filters
- Implementation of JSON columns differ between MySQL and Postgres
- Need to check the dialect name (from
@stackpress/inquire) for DB type engine.dialect.name and write solution per type
Describe the feature you'd like to request
In the generate model store class or model action, we should be able to specify JSON column key names using dot syntax in
filter, and possiblyspanandsortquery inputs.Describe the solution you'd like
Basic filter syntax example:
Should be able to access deep nested keys like the following example:
Should be able to access arrays like the following example:
Should be able to filter by many items in an array like the following example:
Should be able to access deep object/arrays like the following example:
Other query inputs like
spanandsortshould also accept the above examples as well (as it may apply)Describe alternatives you've considered
@stackpress/inquire) for DB typeengine.dialect.nameand write solution per type