Skip to main content

Get a page of records

Get paged, filtered and sorted multiple records

db.schema.table.select returns a filtered and sorted list of pages and total rows according to the paging, filtering and sorting specified in the parameters { data: [], total: int }.

API select

Example Request

{
"method": "smartPanda.mdh.brand.select",
"params": {
"filters": [
{
"field": "id",
"operator": "gt",
"value": 1
}
],
"pagination": {
"current": 1,
"pageSize": 3
},
"sorters": [
{
"field": "id",
"order": "desc"
}
]
}
}

Example response, some parts omitted

{
"data": [
{
"id": 10,
"name": "Swarovski"
},
{
"id": 9,
"name": "Salvatore Ferragamo"
},
{
"id": 8,
"name": "Bvlgari"
}
],
"total": 9
}
info

If the data field is empty, return an empty array [], instead of null.

Note: supported in >=3.0.0