You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT ord, causal_id FROM ^{toTable causalIdsTable} as t(ord, causal_id)
@@ -302,16 +303,17 @@ expectNamespaceIdsByCausalIdsOf trav s = do
302
303
JOIN causals c ON cid.causal_id = c.id
303
304
ORDER BY cid.ord
304
305
|]
305
-
iflength results /=length causalIds
306
-
then unrecoverableError .MissingExpectedEntity$"expectNamespaceIdsByCausalIdsOf: Expected to get the same number of results as causal ids. "<> tShow causalIds
307
-
elsepure results
306
+
<&>\results ->
307
+
iflength results /=length causalIds
308
+
thenLeft.MissingExpectedEntity$"expectNamespaceIdsByCausalIdsOf: Expected to get the same number of results as causal ids. "<> tShow causalIds
expectNamespaceHashesByNamespaceHashIdsOf trav s =do
311
313
s
312
314
& unsafePartsOf trav %%~\namespaceHashIds ->do
313
315
let namespaceHashIdsTable = ordered namespaceHashIds
314
-
results <-
316
+
unrecoverableErrorA $
315
317
queryListCol @(BranchHash)
316
318
[sql| WITH namespace_hash_ids(ord, namespace_hash_id) AS (
317
319
SELECT ord, namespace_hash_id FROM ^{toTable namespaceHashIdsTable} as t(ord, namespace_hash_id)
@@ -321,9 +323,10 @@ expectNamespaceHashesByNamespaceHashIdsOf trav s = do
321
323
JOIN branch_hashes bh ON nhi.namespace_hash_id = bh.id
322
324
ORDER BY nhi.ord
323
325
|]
324
-
iflength results /=length namespaceHashIds
325
-
then unrecoverableError .MissingExpectedEntity$"expectNamespaceHashesByNamespaceHashIdsOf: Expected to get the same number of results as namespace hash ids. "<> tShow namespaceHashIds
326
-
elsepure results
326
+
<&>\results ->
327
+
iflength results /=length namespaceHashIds
328
+
thenLeft.MissingExpectedEntity$"expectNamespaceHashesByNamespaceHashIdsOf: Expected to get the same number of results as namespace hash ids. "<> tShow namespaceHashIds
0 commit comments