1
0
Fork 0
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:
fr33domlover 2016-08-02 11:58:49 +00:00
parent 521871c476
commit 51c99a1dfe

View file

@ -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