SQL: Don't list starting nodes in graph reachable set
This commit is contained in:
parent
521871c476
commit
51c99a1dfe
1 changed files with 3 additions and 2 deletions
|
@ -138,9 +138,10 @@ xreachable' follow filter initials mlen proxy = do
|
||||||
, " ) SELECT DISTINCT ", temp ^* tid
|
, " ) SELECT DISTINCT ", temp ^* tid
|
||||||
, " FROM ", dbname temp
|
, " FROM ", dbname temp
|
||||||
, " WHERE NOT ", temp ^* tcycle
|
, " WHERE NOT ", temp ^* tcycle
|
||||||
|
, " AND array_length(", temp ^* tpath, ", 1) "
|
||||||
, case mlen of
|
, case mlen of
|
||||||
Nothing -> ""
|
Nothing -> ">= 2"
|
||||||
Just _ -> " AND array_length(" <> temp ^* tpath <> ", 1) <= ?"
|
Just _ -> "BETWEEN 2 AND ?"
|
||||||
]
|
]
|
||||||
toP = fmap toPersistValue
|
toP = fmap toPersistValue
|
||||||
toPL = map toPersistValue
|
toPL = map toPersistValue
|
||||||
|
|
Loading…
Reference in a new issue