Uecko_ERP/packages/rdx-criteria
2025-09-29 20:22:59 +02:00
..
src Facturas de cliente 2025-09-29 20:22:59 +02:00
package.json . 2025-05-27 19:47:03 +02:00
readme.md Facturas de cliente 2025-09-29 20:22:59 +02:00
tsconfig.json . 2025-05-09 12:45:32 +02:00

💻 Usage

The criteria converter expect an url with the following format:

  • filters: An array of filters. Composed by:
    • field: The field to filter by.
    • operator: The operator to apply. You can see here the valid operators list.
    • value: The value to filter by.
  • orderBy: The field to order by.
  • order: The order to apply. asc or desc.
  • pageSize: The number of items per page.
  • pageNumber: The page number.

Valid operators

  • =: Equal
  • !=: Not equal
  • >: Greater than
  • <: Less than
  • CONTAINS: Contains. It will translate to like in SQL.
  • NOT_CONTAINS: Not contains. It will translate to not like in SQL.

Url examples

Url with one filter and no order or pagination:

http://localhost:3000/api/users?filters[0][field]=name&filters[0][operator]=CONTAINS&filters[0][value]=Javi

Url with two filter, order and pagination:

http://localhost:3000/api/users
     ?filters[0][field]=name&filters[0][operator]=CONTAINS&filters[0][value]=Javi
     &filters[1][field]=email&filters[1][operator]=CONTAINS&filters[1][value]=gmail
     &orderBy=name
     &order=asc
     &pageSize=10
     &pageNumber=2