mistergreen-queryfilter
v0.0.4
Published
Helpers for creating typeOrm queries for dynamic filtering, pagination and sorting. Each of the helper functions appends to the given `queryBuilder` so you don't need to reassign it.
Downloads
4
Readme
mistergreen-queryfilter
Helpers for creating typeOrm queries for dynamic filtering, pagination and sorting.
Each of the helper functions appends to the given queryBuilder
so you don't need to reassign it.
##Filtering Example for a filter for OrderEntity
FilterBuilder.buildForFilter([filter], 'OrderEntity', querybuilder);
querybuilder.getMany()
Pagination
Example for pagination
FilterBuilder.addPagination(querybuilder, pagination);
querybuilder.getMany()
Sorting
Example for sorting for OrderEntity
FilterBuilder.orderBy(querybuilder, orderBy, 'OrderEntity');
querybuilder.getMany()