| id' <- [1..10]
, year <- [1990..2000]
, t <- ["title", "another title"]
- , hp <- hyperdataDocuments
+ , hp <- arbitraryHyperdataDocuments
, fav <- [True, False]
, ngramCount <- [3..100]
]
(Column PGInt4 )
-----------------------------------------------------------------------
-
-data FacetChart = FacetChart { facetChart_time :: UTCTime'
- , facetChart_count :: Double
- }
- deriving (Show, Generic)
-$(deriveJSON (unPrefix "facetChart_") ''FacetChart)
-instance ToSchema FacetChart
-
-instance Arbitrary FacetChart where
- arbitrary = FacetChart <$> arbitrary <*> arbitrary
-
-----------------------------------------------------------------------
type Trash = Bool
data OrderBy = DateAsc | DateDesc
(doc,(_,(_,(_,contact)))) <- queryAuthorsDoc -< ()
{-nn <- queryNodeNodeTable -< ()
- restrict -< nodeNode_node1_id nn .== _node_id doc
- -- restrict -< nodeNode_delete nn .== (pgBool t)
+ restrict -< nn_node1_id nn .== _node_id doc
+ -- restrict -< nn_delete nn .== (pgBool t)
-}
restrict -< _node_id contact .== (toNullable $ pgNodeId cId)
where
cond12 :: (NodeNgramRead, NodeRead) -> Column PGBool
cond12 (nodeNgram, doc) = _node_id doc
- .== nodeNgram_node_id nodeNgram
+ .== nng_node_id nodeNgram
cond23 :: (NgramsRead, (NodeNgramRead, NodeReadNull)) -> Column PGBool
cond23 (ngrams, (nodeNgram, _)) = ngrams_id ngrams
- .== nodeNgram_ngrams_id nodeNgram
+ .== nng_ngrams_id nodeNgram
cond34 :: (NodeNgramRead, (NgramsRead, (NodeNgramReadNull, NodeReadNull))) -> Column PGBool
- cond34 (nodeNgram2, (ngrams, (_,_)))= ngrams_id ngrams .== nodeNgram_ngrams_id nodeNgram2
+ cond34 (nodeNgram2, (ngrams, (_,_)))= ngrams_id ngrams .== nng_ngrams_id nodeNgram2
cond45 :: (NodeRead, (NodeNgramRead, (NgramsReadNull, (NodeNgramReadNull, NodeReadNull)))) -> Column PGBool
- cond45 (contact, (nodeNgram2, (_, (_,_)))) = _node_id contact .== nodeNgram_node_id nodeNgram2
+ cond45 (contact, (nodeNgram2, (_, (_,_)))) = _node_id contact .== nng_node_id nodeNgram2
------------------------------------------------------------------------
viewDocuments cId t ntId = proc () -> do
n <- queryNodeTable -< ()
nn <- queryNodeNodeTable -< ()
- restrict -< _node_id n .== nodeNode_node2_id nn
- restrict -< nodeNode_node1_id nn .== (pgNodeId cId)
- restrict -< _node_typename n .== (pgInt4 ntId)
- restrict -< nodeNode_delete nn .== (pgBool t)
- returnA -< FacetDoc (_node_id n) (_node_date n) (_node_name n) (_node_hyperdata n) (nodeNode_favorite nn) (pgInt4 1)
+ restrict -< _node_id n .== nn_node2_id nn
+ restrict -< nn_node1_id nn .== (pgNodeId cId)
+ restrict -< _node_typename n .== (pgInt4 ntId)
+ restrict -< nn_delete nn .== (pgBool t)
+ returnA -< FacetDoc (_node_id n) (_node_date n) (_node_name n) (_node_hyperdata n) (nn_favorite nn) (pgInt4 1)
------------------------------------------------------------------------