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