Releases: chax-at/prisma-filter
Releases · chax-at/prisma-filter
4.2.0
4.1.0
Added
- Added a new parameter to
DirectFilterPipe,AllFilterPipeUnsafeandFilterParser, allowing you to define a default sort order that is always appended unless the keys are set by the request.
Changed
- Minimum required node version increased to 18 (which should not be breaking because node 16 is EOL since 2023-09-11)
4.0.0
⚠️ Breaking Changes
Added new filter operations. Make sure that both the common-package and the prisma-filter-package in your Frontend and Backend are on version 4.
Added
- Added
ArrayContains,ArrayStartsWith,ArrayEndsWithfilters (by @memicmiralem).
3.0.0
⚠️ Breaking Changes
Added new filter operations. Make sure that both the common-package and the prisma-filter-package in your Frontend and Backend are on version 3.
Added
- Added
(I)Search,(I)StartsWith,(I)EndsWith,(I)Contains,NotIn,NotInStringsfilters. (I)Likeis now deprecated,(I)Containsshould be used instead to better match the Prisma operation.
2.5.0
2.4.0
Fixed
Ilikefilter now correctly always converts the value to a string (likeLike)
Changed
FilterBuildernow builds value arrays in the form offilter[0][value][]=13instead offilter[0][value][0]=13to save some characters and fix a bug where large arrays might be parsed as objects instead of arrays.
2.3.0
2.2.0
⚠️ Important Changes
- The
prisma-filter-commonshould now be installed independenciesinstead ofdevDependenciesso that the newFilterBuildercan be used.- This is not a breaking change, but is important to be able to use new features.
Added
- Added new
FilterBuilderclass toprisma-filter-commonwhich provides abuildFilterQueryStringmethod
to transform a filter into a query string.
2.1.0
2.0.0
Breaking Changes
- The typing of
ISingleOrder.fieldchanged fromkeyof Ttokeyof T & string.
If you use the recommended file with class-validator, then you have to adapt the SingleFilterOrder class:
export class SingleFilterOrder<T> implements ISingleOrder<T> {
@IsString()
field!: keyof T & string;
@IsIn(['asc', 'desc'])
dir!: FilterOrder;
}- The
Likefilter is now case-sensitive, use the newIlikefilter instead to keep the old behaviour. - The
NeqNullfilter has been renamed toNeNull. - The deprecated
IPaginatedDtointerface has been removed.
Added
- New
AllFilterPipeUnsafethat allows filtering all model keys without specifying them. - Support for booleans in
Eq,Nefilters. InStrings,EqString,NeStringfilters to explicitly filter by string instead of using auto conversion.
Changed
- Split up
Like,Ilikefilters. - Renamed
NeqNulltoNeNullto be more consistent.
Removed
IPaginatedDtointerface.