Page Contents

Home > @loopback/sequelize > SequelizeCrudRepository > buildSequelizeOrder

SequelizeCrudRepository.buildSequelizeOrder() method

Get Sequelize Order filter value from loopback style order value.

It also supports passing associations in the order array to sort by nested models. Example: ["user email ASC"].


protected buildSequelizeOrder(order?: string[] | string): Order | undefined;


Parameter Type Description
order string[] | string (Optional) Sorting order in loopback style filter. eg. title ASC, ["id DESC", "age ASC"]


Order | undefined

Sequelize compatible order filter value