-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maps additional array (
IList
) operators
| C# expression | SQL generated by Npgsql | |----------------------------------|-------------------------| | `Array.Length` | `array_length(1, 1)` | `IList.Count` | `array_length(a, 1)` | `Enumerable.Count(a)` | `array_length(a, 1)` | `Array[0]` | `a[1]` | `IList[0]` | `a[1]` | `Enumerable.ElementAt(a, 0)` | `a[1]` | `Enumerable.Append(a, b)` | `a || b` | `Enumerable.Concat(a, b)` | `a || b` | `Enumerable.Prepend(a, b)` | `b || a` | `Object.Equals(a, b)` | `a = b` | `Enumerable.SequenceEqual(a, b)` | `a = b` | `a.ToString()` | `array_to_string(a, ',')` | `Enumerable.IndexOf(a, 0)` | `COALESCE(array_position(a, 1), -1)` | `Enumerable.Contains(a, b)` | `b = ANY (a)` | C# expression | SQL generated by Npgsql | |----------------------------|-------------------------| | `a.All(x => b.Contains(x)` | `b <@ a` | `a.Any(x => b.Contains(x)` | `a && b` - Relational operators could also be supported via extensions on `EF.Functions`. - https://www.postgresql.org/docs/current/static/functions-array.html#ARRAY-OPERATORS-TABLE
- Loading branch information
1 parent
d9af112
commit 2efbbbd
Showing
5 changed files
with
272 additions
and
104 deletions.
There are no files selected for viewing
67 changes: 0 additions & 67 deletions
67
src/EFCore.PG/Query/ExpressionTranslators/Internal/NpgsqlArraySequenceEqualTranslator.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.