mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-29 00:44:52 +09:00
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
|
||||
, " FROM ", dbname temp
|
||||
, " WHERE NOT ", temp ^* tcycle
|
||||
, " AND array_length(", temp ^* tpath, ", 1) "
|
||||
, case mlen of
|
||||
Nothing -> ""
|
||||
Just _ -> " AND array_length(" <> temp ^* tpath <> ", 1) <= ?"
|
||||
Nothing -> ">= 2"
|
||||
Just _ -> "BETWEEN 2 AND ?"
|
||||
]
|
||||
toP = fmap toPersistValue
|
||||
toPL = map toPersistValue
|
||||
|
|
Loading…
Reference in a new issue