correct query on rpc count=exact
corrects bad logic on e4006da(perf: remove toSourceRel)
This commit is contained in:
committed by
Steve Chavez
parent
2905753194
commit
c445105d55
@@ -236,11 +236,12 @@ readRequestToCountQuery (Node (Select{from=mainQi, fromAlias=tblAlias, implicitJ
|
||||
then mempty
|
||||
else " WHERE " ) <>
|
||||
intercalateSnippet " AND " (
|
||||
map (pgFmtLogicTree mainQi) logicForest ++
|
||||
map (pgFmtLogicTree treeQi) logicForest ++
|
||||
map pgFmtJoinCondition joinConditions_ ++
|
||||
subQueries
|
||||
)
|
||||
where
|
||||
treeQi = maybe mainQi (QualifiedIdentifier (qiSchema mainQi)) tblAlias
|
||||
tabl = fromQi mainQi <> maybe mempty (\a -> " AS " <> pgFmtIdent a) tblAlias
|
||||
implJs = fromQi <$> implJoins
|
||||
subQueries = foldr existsSubquery [] forest
|
||||
|
||||
Reference in New Issue
Block a user