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
42a45d1b
Commit
42a45d1b
authored
Feb 26, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MOCK] pushing for the meeting and tests with the team.
parent
b0712c53
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
Count.hs
src/Gargantext/API/Count.hs
+9
-2
Facet.hs
src/Gargantext/Database/Facet.hs
+0
-1
No files found.
src/Gargantext/API/Count.hs
View file @
42a45d1b
...
@@ -31,7 +31,9 @@ import GHC.Generics (Generic)
...
@@ -31,7 +31,9 @@ import GHC.Generics (Generic)
import
Data.Aeson
hiding
(
Error
)
import
Data.Aeson
hiding
(
Error
)
import
Test.QuickCheck.Arbitrary
import
Test.QuickCheck.Arbitrary
import
Test.QuickCheck
(
elements
)
import
Test.QuickCheck
(
elements
)
import
Data.List
(
permutations
)
import
Data.List
(
repeat
,
permutations
)
-- import Control.Applicative ((<*>))
-----------------------------------------------------------------------
-----------------------------------------------------------------------
type
CountAPI
=
Post
'[
J
SON
]
Counts
type
CountAPI
=
Post
'[
J
SON
]
Counts
...
@@ -71,6 +73,7 @@ data Query = Query { query_query :: QueryBool
...
@@ -71,6 +73,7 @@ data Query = Query { query_query :: QueryBool
deriving
(
Eq
,
Show
,
Generic
)
deriving
(
Eq
,
Show
,
Generic
)
instance
FromJSON
Query
instance
FromJSON
Query
instance
ToJSON
Query
instance
ToJSON
Query
instance
Arbitrary
Query
where
instance
Arbitrary
Query
where
arbitrary
=
elements
[
Query
q
(
Just
n
)
arbitrary
=
elements
[
Query
q
(
Just
n
)
|
q
<-
queries
|
q
<-
queries
...
@@ -95,7 +98,7 @@ messages = toMessage $ [ (400, ["Ill formed query "])
...
@@ -95,7 +98,7 @@ messages = toMessage $ [ (400, ["Ill formed query "])
,
(
300
,
[
"Internal Gargantext Error "
])
,
(
300
,
[
"Internal Gargantext Error "
])
,
(
300
,
[
"Connexion to Gargantext Error"
])
,
(
300
,
[
"Connexion to Gargantext Error"
])
,
(
300
,
[
"Token has expired "
])
,
(
300
,
[
"Token has expired "
])
]
--
<> take 10 ( repeat (200, [""]))
]
<>
take
10
(
repeat
(
200
,
[
""
]))
instance
Arbitrary
Message
where
instance
Arbitrary
Message
where
arbitrary
=
elements
messages
arbitrary
=
elements
messages
...
@@ -119,6 +122,10 @@ data Count = Count { count_name :: Scraper
...
@@ -119,6 +122,10 @@ data Count = Count { count_name :: Scraper
instance
FromJSON
Count
instance
FromJSON
Count
instance
ToJSON
Count
instance
ToJSON
Count
--
--instance Arbitrary Count where
-- arbitrary = Count <$> arbitrary <*> arbitrary <*> arbitrary
instance
Arbitrary
Counts
where
instance
Arbitrary
Counts
where
arbitrary
=
elements
$
select
arbitrary
=
elements
$
select
...
...
src/Gargantext/Database/Facet.hs
View file @
42a45d1b
...
@@ -129,7 +129,6 @@ nodeNodeNgramLeftJoin' nId = leftJoin queryNodeTable queryNodeNodeNgramTable (eq
...
@@ -129,7 +129,6 @@ nodeNodeNgramLeftJoin' nId = leftJoin queryNodeTable queryNodeNodeNgramTable (eq
((
.==
)
nId'
(
toNullable
n2
))
((
.==
)
nId'
(
toNullable
n2
))
leftJoin3
::
(
Default
NullMaker
(
columnsL1
,
nullableColumnsR
)
nullableColumnsR1
,
leftJoin3
::
(
Default
NullMaker
(
columnsL1
,
nullableColumnsR
)
nullableColumnsR1
,
Default
NullMaker
columnsR
nullableColumnsR
,
Default
NullMaker
columnsR
nullableColumnsR
,
Default
Unpackspec
columnsR
columnsR
,
Default
Unpackspec
columnsR
columnsR
,
...
...
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