Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
haskell-gargantext
Commits
cccbe872
Commit
cccbe872
authored
May 11, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FACET] Order by Date Asc by default.
parent
a1bda6a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
Facet.hs
src/Gargantext/Database/Facet.hs
+11
-8
No files found.
src/Gargantext/Database/Facet.hs
View file @
cccbe872
...
@@ -259,14 +259,17 @@ filterWith :: (PGOrd date, PGOrd title, PGOrd score) =>
...
@@ -259,14 +259,17 @@ filterWith :: (PGOrd date, PGOrd title, PGOrd score) =>
filterWith
o
l
order
q
=
limit'
l
$
offset'
o
$
orderBy
(
orderWith
order
)
q
filterWith
o
l
order
q
=
limit'
l
$
offset'
o
$
orderBy
(
orderWith
order
)
q
orderWith
::
(
PGOrd
b1
,
PGOrd
b2
,
PGOrd
b3
)
=>
Maybe
OrderBy
->
Order
(
Facet
id
(
Column
b1
)
(
Column
b2
)
hyperdata
(
Column
b3
)
score
)
orderWith
::
(
PGOrd
b1
,
PGOrd
b2
,
PGOrd
b3
)
orderWith
order
=
case
order
of
=>
Maybe
OrderBy
(
Just
DateAsc
)
->
asc
facetDoc_created
->
Order
(
Facet
id
(
Column
b1
)
(
Column
b2
)
hyperdata
(
Column
b3
)
score
)
orderWith
(
Just
DateAsc
)
=
asc
facetDoc_created
orderWith
(
Just
DateDesc
)
=
desc
facetDoc_created
(
Just
TitleAsc
)
->
asc
facetDoc_title
orderWith
(
Just
TitleAsc
)
=
asc
facetDoc_title
(
Just
TitleDesc
)
->
desc
facetDoc_title
orderWith
(
Just
TitleDesc
)
=
desc
facetDoc_title
(
Just
ScoreAsc
)
->
asc
facetDoc_favorite
orderWith
(
Just
ScoreAsc
)
=
asc
facetDoc_favorite
(
Just
ScoreDesc
)
->
desc
facetDoc_favorite
orderWith
(
Just
ScoreDesc
)
=
desc
facetDoc_favorite
_
->
desc
facetDoc_created
orderWith
_
=
asc
facetDoc_created
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment