Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97b6022f5a | ||
|
|
c413833ec8 |
@@ -5,6 +5,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## [13.0.2] - 2025-06-02
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix regression that makes `ORDER BY` with nulls-order not work alongside limits by @laurenceisla in #4109
|
||||||
|
|
||||||
## [13.0.1] - 2025-06-01
|
## [13.0.1] - 2025-06-01
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
name: postgrest
|
name: postgrest
|
||||||
version: 13.0.1
|
version: 13.0.2
|
||||||
synopsis: REST API for any Postgres database
|
synopsis: REST API for any Postgres database
|
||||||
description: Reads the schema of a PostgreSQL database and creates RESTful routes
|
description: Reads the schema of a PostgreSQL database and creates RESTful routes
|
||||||
for tables, views, and functions, supporting all HTTP methods that security
|
for tables, views, and functions, supporting all HTTP methods that security
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ readPlanToQuery node@(Node ReadPlan{select,from=mainQi,fromAlias,where_=logicFor
|
|||||||
(if null logicForest && null relJoinConds
|
(if null logicForest && null relJoinConds
|
||||||
then mempty
|
then mempty
|
||||||
else " WHERE " <> intercalateSnippet " AND " (map (pgFmtLogicTree qi) logicForest ++ map pgFmtJoinCondition relJoinConds)) <> " " <>
|
else " WHERE " <> intercalateSnippet " AND " (map (pgFmtLogicTree qi) logicForest ++ map pgFmtJoinCondition relJoinConds)) <> " " <>
|
||||||
groupF qi select relSelect <>
|
groupF qi select relSelect <> " " <>
|
||||||
orderF qi order <>
|
orderF qi order <> " " <>
|
||||||
limitOffsetF readRange
|
limitOffsetF readRange
|
||||||
where
|
where
|
||||||
fromFrag = fromF relToParent mainQi fromAlias
|
fromFrag = fromF relToParent mainQi fromAlias
|
||||||
|
|||||||
@@ -223,6 +223,14 @@ spec = do
|
|||||||
, "Content-Range" <:> "2-4/*" ]
|
, "Content-Range" <:> "2-4/*" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
it "works alongside order by with nulls order" $
|
||||||
|
get "/clients?select=id,projects(id,tasks(id))&order=id.asc.nullslast&limit=1&projects.order=id.asc.nullsfirst&projects.limit=2"
|
||||||
|
`shouldRespondWith`
|
||||||
|
[json|[{"id":1,"projects":[{"id": 1, "tasks": [{"id": 1}, {"id": 2}]}, {"id": 2, "tasks": [{"id": 3}, {"id": 4}]}]}]|]
|
||||||
|
{ matchStatus = 200
|
||||||
|
, matchHeaders = ["Content-Range" <:> "0-0/*"]
|
||||||
|
}
|
||||||
|
|
||||||
context "succeeds if offset equals 0 as a no-op" $ do
|
context "succeeds if offset equals 0 as a no-op" $ do
|
||||||
it "no items" $ do
|
it "no items" $ do
|
||||||
get "/items?offset=0&id=eq.0"
|
get "/items?offset=0&id=eq.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user