-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Right now, the current signature of orderBy is like this:
orderBy: 'a => queryBuilder
It's translated to knex like this:
knex
.orderBy("columnName")
But what about this usage:
knex
.orderBy("columnName", "DESC")
A common pattern for binding I saw it add a new function like:
orderByWithDirection: (string, string) => queryBuilder
And since there is only too possible direction (ASC and DESC), we can use bucklescript's unwrap feature to make it typesafe with polymorphic variants
Metadata
Metadata
Assignees
Labels
No labels