Skip to content

Commit 8a2f56b

Browse files
committed
chore: fix formatting
1 parent ea338e1 commit 8a2f56b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/PostgREST/Query/SqlFragment.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,13 @@ pgFmtFullSelName aggAlias fieldName = case fieldName of
378378
fromJsonBodyF :: Maybe LBS.ByteString -> [CoercibleField] -> Bool -> Bool -> Bool -> TrackedSnippet
379379
fromJsonBodyF body fields includeSelect includeLimitOne includeDefaults =
380380
(if includeSelect then rawSQL "SELECT " <> namedCols <> rawSQL " " else emptyTracked) <>
381-
rawSQL "FROM (SELECT " <> jsonPlaceHolder <> rawSQL " AS json_data) pgrst_payload, " <>
381+
rawSQL "FROM (SELECT " <> jsonPlaceHolder <> rawSQL " AS json_data) pgrst_payload, " <>
382382
(if includeDefaults
383383
then if isJsonObject
384384
then rawSQL "LATERAL (SELECT " <> defsJsonb <> rawSQL " || pgrst_payload.json_data AS val) pgrst_json_defs, "
385385
else rawSQL "LATERAL (SELECT jsonb_agg(" <> defsJsonb <> rawSQL " || elem) AS val from jsonb_array_elements(pgrst_payload.json_data) elem) pgrst_json_defs, "
386-
else emptyTracked ) <>
387-
rawSQL "LATERAL (SELECT " <> parsedCols <> rawSQL " FROM " <>
386+
else emptyTracked ) <>
387+
rawSQL "LATERAL (SELECT " <> parsedCols <> rawSQL " FROM " <>
388388
(if null fields -- when json keys are empty, e.g. when payload is `{}` or `[{}, {}]`
389389
then
390390
if isJsonObject
@@ -415,7 +415,7 @@ fromJsonBodyF body fields includeSelect includeLimitOne includeDefaults =
415415

416416
pgFmtOrderTerm :: QualifiedIdentifier -> CoercibleOrderTerm -> TrackedSnippet
417417
pgFmtOrderTerm qi ot =
418-
fmtOTerm ot <> rawSQL " " <>
418+
fmtOTerm ot <> rawSQL " " <>
419419
rawSQL ( BS.unwords [
420420
maybe mempty direction $ coDirection ot,
421421
maybe mempty nullOrder $ coNullOrder ot])
@@ -460,7 +460,7 @@ pgFmtFilter table (CoercibleFilter fld (OpExpr hasNot oper)) = rawSQL notOp <> r
460460
-- The above can be fixed by using `PREPARE boolplan AS SELECT * FROM projects where id IS NOT DISTINCT FROM $1;`
461461
-- However that would not accept the TRUE/FALSE/NULL/"NOT NULL"/UNKNOWN keywords. See: https://stackoverflow.com/questions/6133525/proper-way-to-set-preparedstatement-parameter-to-null-under-postgres.
462462
-- This is why `IS` operands are whitelisted at the Parsers.hs level
463-
Is isVal -> rawSQL " IS " <>
463+
Is isVal -> rawSQL " IS " <>
464464
case isVal of
465465
IsNull -> rawSQL "NULL"
466466
IsNotNull -> rawSQL "NOT NULL"

test/spec/Feature/Query/RawSQLSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module Feature.Query.RawSQLSpec where
33
import Network.Wai (Application)
44

55
import Network.HTTP.Types
6-
import Network.Wai.Test (SResponse (simpleHeaders, simpleStatus))
6+
import Network.Wai.Test (SResponse (simpleHeaders, simpleStatus))
77
import Test.Hspec
88
import Test.Hspec.Wai
99
import Test.Hspec.Wai.JSON

0 commit comments

Comments
 (0)