Skip to content

Commit

Permalink
Format sql statement (#17354)
Browse files Browse the repository at this point in the history
(cherry picked from commit aa9f194)
  • Loading branch information
Zeegaan committed Oct 24, 2024
1 parent d6f17ee commit 5a5de18
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,8 @@ string c(string x)
}

Assert.AreEqual(
@$"DELETE FROM {t("cmsContentNu")} WHERE {c("nodeId")} IN (SELECT {c("nodeId")} FROM (SELECT DISTINCT cmsContentNu.nodeId
FROM {t("cmsContentNu")}
INNER JOIN {t("umbracoNode")}
ON {t("cmsContentNu")}.{c("nodeId")} = {t("umbracoNode")}.{c("id")}
WHERE (({t("umbracoNode")}.{c("nodeObjectType")} = @0))) x)".Replace(Environment.NewLine, " ").Replace("\n", " ")
.Replace("\r", " "),
@$"DELETE FROM {t("cmsContentNu")} WHERE {c("nodeId")} IN (SELECT {c("nodeId")} FROM (SELECT DISTINCT cmsContentNu.nodeId FROM {t("cmsContentNu")} INNER JOIN {t("umbracoNode")} ON {t("cmsContentNu")}.{c("nodeId")} = {t("umbracoNode")}.{c("id")} WHERE (({t("umbracoNode")}.{c("nodeObjectType")} = @0))) x)".Replace(Environment.NewLine, " ")
.Replace("\n", " ").Replace("\r", " "),
sqlOutput.SQL.Replace(Environment.NewLine, " ").Replace("\n", " ").Replace("\r", " "));

Assert.AreEqual(1, sqlOutput.Arguments.Length);
Expand Down

0 comments on commit 5a5de18

Please sign in to comment.