Skip to content

Commit

Permalink
Fixed AddDescending implementation. (#7978)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib authored Feb 2, 2025
1 parent 217b2e0 commit 1492d4d
Show file tree
Hide file tree
Showing 11 changed files with 139 additions and 139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public SortDefinition<T> AddDescending<TResult>(
throw new ArgumentNullException(nameof(keySelector));
}

var operations = Operations.Add(SortBy<T>.Ascending(keySelector));
var operations = Operations.Add(SortBy<T>.Descending(keySelector));
return new SortDefinition<T>(operations);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,44 @@
"brands": {
"nodes": [
{
"id": "QnJhbmQ6OQ==",
"name": "AirStrider"
"id": "QnJhbmQ6MTE=",
"name": "Zephyr"
},
{
"id": "QnJhbmQ6NQ==",
"name": "B&R"
"id": "QnJhbmQ6MTM=",
"name": "XE"
},
{
"id": "QnJhbmQ6MQ==",
"name": "Daybird"
"id": "QnJhbmQ6Mw==",
"name": "WildRunner"
},
{
"id": "QnJhbmQ6Mg==",
"name": "Gravitator"
"id": "QnJhbmQ6Nw==",
"name": "Solstix"
},
{
"id": "QnJhbmQ6MTA=",
"name": "Green Equipment"
"id": "QnJhbmQ6Ng==",
"name": "Raptor Elite"
},
{
"id": "QnJhbmQ6OA==",
"name": "Grolltex"
"id": "QnJhbmQ6NA==",
"name": "Quester"
},
{
"id": "QnJhbmQ6MTI=",
"name": "Legend"
},
{
"id": "QnJhbmQ6NA==",
"name": "Quester"
"id": "QnJhbmQ6OA==",
"name": "Grolltex"
},
{
"id": "QnJhbmQ6Ng==",
"name": "Raptor Elite"
"id": "QnJhbmQ6MTA=",
"name": "Green Equipment"
},
{
"id": "QnJhbmQ6Nw==",
"name": "Solstix"
"id": "QnJhbmQ6Mg==",
"name": "Gravitator"
}
]
}
Expand All @@ -59,7 +59,7 @@
-- @__p_0='11'
SELECT b."Id", b."Name"
FROM "Brands" AS b
ORDER BY b."Name", b."Id"
ORDER BY b."Name" DESC, b."Id"
LIMIT @__p_0
```

Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"brands": {
"nodes": [
{
"id": "QnJhbmQ6OQ==",
"name": "AirStrider"
"id": "QnJhbmQ6MTE=",
"name": "Zephyr"
},
{
"id": "QnJhbmQ6NQ==",
"name": "B&R"
"id": "QnJhbmQ6MTM=",
"name": "XE"
}
]
}
Expand All @@ -27,7 +27,7 @@
-- @__p_0='3'
SELECT b."Id", b."Name"
FROM "Brands" AS b
ORDER BY b."Name", b."Id"
ORDER BY b."Name" DESC, b."Id"
LIMIT @__p_0
```

Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@
"brands": {
"nodes": [
{
"id": "QnJhbmQ6OQ==",
"name": "AirStrider",
"id": "QnJhbmQ6MTE=",
"name": "Zephyr",
"products": {
"nodes": [
{
"id": "UHJvZHVjdDo5",
"name": "VenturePro GPS Watch"
"id": "UHJvZHVjdDoxMg==",
"name": "Powder Pro Snowboard"
},
{
"id": "UHJvZHVjdDozNA==",
"name": "Velocity Red Bike Helmet"
"id": "UHJvZHVjdDoyMw==",
"name": "Summit Pro Climbing Harness"
}
]
}
},
{
"id": "QnJhbmQ6NQ==",
"name": "B&R",
"id": "QnJhbmQ6MTM=",
"name": "XE",
"products": {
"nodes": [
{
"id": "UHJvZHVjdDo1",
"name": "Blizzard Rider Snowboard"
"id": "UHJvZHVjdDo3Nw==",
"name": "Survivor 2-Person Tent"
},
{
"id": "UHJvZHVjdDoyMA==",
"name": "Explorer Biking Computer"
"id": "UHJvZHVjdDo4MA==",
"name": "Pathfinder GPS Watch"
}
]
}
Expand All @@ -51,14 +51,14 @@
-- @__p_0='3'
SELECT b."Id", b."Name"
FROM "Brands" AS b
ORDER BY b."Name", b."Id"
ORDER BY b."Name" DESC, b."Id"
LIMIT @__p_0
```

## Query 2

```sql
-- @__brandIds_0={ '5', '9' } (DbType = Object)
-- @__brandIds_0={ '11', '13' } (DbType = Object)
SELECT p1."BrandId", p3."Id", p3."Name", p3."BrandId"
FROM (
SELECT p."BrandId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@
"brands": {
"nodes": [
{
"id": "QnJhbmQ6OQ==",
"name": "AirStrider",
"id": "QnJhbmQ6MTE=",
"name": "Zephyr",
"products": {
"nodes": [
{
"id": "UHJvZHVjdDo5",
"name": "VenturePro GPS Watch"
"id": "UHJvZHVjdDoxMg==",
"name": "Powder Pro Snowboard"
},
{
"id": "UHJvZHVjdDozNA==",
"name": "Velocity Red Bike Helmet"
"id": "UHJvZHVjdDoyMw==",
"name": "Summit Pro Climbing Harness"
}
]
}
},
{
"id": "QnJhbmQ6NQ==",
"name": "B&R",
"id": "QnJhbmQ6MTM=",
"name": "XE",
"products": {
"nodes": [
{
"id": "UHJvZHVjdDo1",
"name": "Blizzard Rider Snowboard"
"id": "UHJvZHVjdDo3Nw==",
"name": "Survivor 2-Person Tent"
},
{
"id": "UHJvZHVjdDoyMA==",
"name": "Explorer Biking Computer"
"id": "UHJvZHVjdDo4MA==",
"name": "Pathfinder GPS Watch"
}
]
}
Expand All @@ -51,14 +51,14 @@
-- @__p_0='3'
SELECT b."Id", b."Name"
FROM "Brands" AS b
ORDER BY b."Name", b."Id"
ORDER BY b."Name" DESC, b."Id"
LIMIT @__p_0
```

## Query 2

```sql
-- @__brandIds_0={ '5', '9' } (DbType = Object)
-- @__brandIds_0={ '11', '13' } (DbType = Object)
SELECT p1."BrandId", p3."Id", p3."Name", p3."BrandId"
FROM (
SELECT p."BrandId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,42 @@
"brands": {
"nodes": [
{
"id": "QnJhbmQ6OQ==",
"id": "QnJhbmQ6MTE=",
"products": {
"nodes": [
{
"id": "UHJvZHVjdDo5",
"name": "VenturePro GPS Watch",
"id": "UHJvZHVjdDoxMg==",
"name": "Powder Pro Snowboard",
"brand": {
"name": "AirStrider"
"name": "Zephyr"
}
},
{
"id": "UHJvZHVjdDozNA==",
"name": "Velocity Red Bike Helmet",
"id": "UHJvZHVjdDoyMw==",
"name": "Summit Pro Climbing Harness",
"brand": {
"name": "AirStrider"
"name": "Zephyr"
}
}
]
}
},
{
"id": "QnJhbmQ6NQ==",
"id": "QnJhbmQ6MTM=",
"products": {
"nodes": [
{
"id": "UHJvZHVjdDo1",
"name": "Blizzard Rider Snowboard",
"id": "UHJvZHVjdDo3Nw==",
"name": "Survivor 2-Person Tent",
"brand": {
"name": "B&R"
"name": "XE"
}
},
{
"id": "UHJvZHVjdDoyMA==",
"name": "Explorer Biking Computer",
"id": "UHJvZHVjdDo4MA==",
"name": "Pathfinder GPS Watch",
"brand": {
"name": "B&R"
"name": "XE"
}
}
]
Expand All @@ -61,14 +61,14 @@
-- @__p_0='3'
SELECT b."Id", b."Name"
FROM "Brands" AS b
ORDER BY b."Name", b."Id"
ORDER BY b."Name" DESC, b."Id"
LIMIT @__p_0
```

## Query 2

```sql
-- @__brandIds_0={ '5', '9' } (DbType = Object)
-- @__brandIds_0={ '11', '13' } (DbType = Object)
SELECT p1."BrandId", p3."Id", p3."Name", p3."BrandId"
FROM (
SELECT p."BrandId"
Expand All @@ -91,7 +91,7 @@ ORDER BY p1."BrandId"
## Query 3

```sql
-- @__ids_0={ '5', '9' } (DbType = Object)
-- @__ids_0={ '11', '13' } (DbType = Object)
SELECT b."Id", b."Name"
FROM "Brands" AS b
WHERE b."Id" = ANY (@__ids_0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,42 @@
"brands": {
"nodes": [
{
"id": "QnJhbmQ6OQ==",
"id": "QnJhbmQ6MTE=",
"products": {
"nodes": [
{
"id": "UHJvZHVjdDo5",
"name": "VenturePro GPS Watch",
"id": "UHJvZHVjdDoxMg==",
"name": "Powder Pro Snowboard",
"brand": {
"name": "AirStrider"
"name": "Zephyr"
}
},
{
"id": "UHJvZHVjdDozNA==",
"name": "Velocity Red Bike Helmet",
"id": "UHJvZHVjdDoyMw==",
"name": "Summit Pro Climbing Harness",
"brand": {
"name": "AirStrider"
"name": "Zephyr"
}
}
]
}
},
{
"id": "QnJhbmQ6NQ==",
"id": "QnJhbmQ6MTM=",
"products": {
"nodes": [
{
"id": "UHJvZHVjdDo1",
"name": "Blizzard Rider Snowboard",
"id": "UHJvZHVjdDo3Nw==",
"name": "Survivor 2-Person Tent",
"brand": {
"name": "B&R"
"name": "XE"
}
},
{
"id": "UHJvZHVjdDoyMA==",
"name": "Explorer Biking Computer",
"id": "UHJvZHVjdDo4MA==",
"name": "Pathfinder GPS Watch",
"brand": {
"name": "B&R"
"name": "XE"
}
}
]
Expand All @@ -61,14 +61,14 @@
-- @__p_0='3'
SELECT b."Id", b."Name"
FROM "Brands" AS b
ORDER BY b."Name", b."Id"
ORDER BY b."Name" DESC, b."Id"
LIMIT @__p_0
```

## Query 2

```sql
-- @__brandIds_0={ '5', '9' } (DbType = Object)
-- @__brandIds_0={ '11', '13' } (DbType = Object)
SELECT t."BrandId", t0."Id", t0."Name", t0."BrandId"
FROM (
SELECT p."BrandId"
Expand All @@ -91,7 +91,7 @@ ORDER BY t."BrandId"
## Query 3

```sql
-- @__ids_0={ '5', '9' } (DbType = Object)
-- @__ids_0={ '11', '13' } (DbType = Object)
SELECT b."Id", b."Name"
FROM "Brands" AS b
WHERE b."Id" = ANY (@__ids_0)
Expand Down
Loading

0 comments on commit 1492d4d

Please sign in to comment.