Description
There is a TODO that hangs for quite a long time already.
Namely, in sorting, if some field allows null, it should be possible to specify whether these nulls should appear at the beginning or at the end. beam-postresql allows us to specify this, so SortingParams can allow that too.
A good place to start from: uncomment this code.
Acceptance criteria
- A concise syntax for API is provided.
+date? vs +?date, something else?
- User can specify nulls sorting only for fields of
Maybe X type, otherwise server rejects that.
- All necessary modules are updated among the following
Servant.Util.Sorting.*
Servant.Util.Dummy.Sorting
Servant.Util.Beam.Postgres.Sorting
- Parameter constructors for client handlers are added (in
*.Sorting.Construction module).
Probably a sane interface to aim at: nullsFirst asc #field or nullsLast desc #field.
- Tests are extended to cover the nulls sorting.
Description
There is a
TODOthat hangs for quite a long time already.Namely, in sorting, if some field allows
null, it should be possible to specify whether thesenulls should appear at the beginning or at the end.beam-postresqlallows us to specify this, soSortingParamscan allow that too.A good place to start from: uncomment this code.
Acceptance criteria
+date?vs+?date, something else?Maybe Xtype, otherwise server rejects that.Servant.Util.Sorting.*Servant.Util.Dummy.SortingServant.Util.Beam.Postgres.Sorting*.Sorting.Constructionmodule).Probably a sane interface to aim at:
nullsFirst asc #fieldornullsLast desc #field.