Left join entity is never null
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 38/100
Rechercherichtung
Es wird keine Quelldatei oder kein Test genannt. Beginne damit, beide Abfrageformen aus dem Issue gegen SQLProvider v1.1.93 zu reproduzieren, mit Fokus auf leftOuterJoin, DefaultIfEmpty() und die gemeldete Entity mit Standardwert. Als abgeschlossen gilt die Dokumentation oder das Testen der unterstützten Syntax und des erwarteten Verhaltens bei einer fehlenden Entity.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Describe the bug
I am trying to left join "sheets" entity but I can't get it to work properly.
The documentation says that leftOuterJoin is not supported, but I see examples on stackoverflow of people saying this works.
For me it does not.
query {
for e in ctx.Dbo.TimeEntries do
join t in ctx.Dbo.ProjectTasks on (e.TaskId = t.Id)
leftOuterJoin sheet in ctx.Dbo.DrawingLogSheets on (e.SheetId = Some sheet.Id) into sheetResults
for s in sheetResults.DefaultIfEmpty() do
where (e.Email = Some email && e.Date = dateOnly)
select (toTimeEntry(e, t, s))
}
This fails with an error.
I also tried this approach:
query {
for e in ctx.Dbo.TimeEntries do
join t in ctx.Dbo.ProjectTasks on (e.TaskId = t.Id)
join s in (!!) ctx.Dbo.DrawingLogSheets on (e.SheetId = Some s.Id)
where (e.Email = Some email && e.Date = dateOnly)
select (toTimeEntry(e, t, s))
}
This kind of works, but sheet is never null when it is missing; instead, it has all its values defaulted. For example, its ID field is a new guid (all zeros), and its string values are all empty string. I suppose I could check for defaulted guid, but this just feels like something is not right.
To Reproduce
Expected behavior
In the first example (leftOuterJoin), I just want to verify whether this syntax is supposed to be supported or not.
In the second example (!!), I would expect the sheet entity to be null when no sheet is joined, but instead it is instantiated with all default values.
Screenshots
Desktop (please complete the following information):
- Windows
- SQLProvider is v1.1.93
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
- Vorherrschende Sprache
- F#
- Sterne
- 627
- Forks
- 147
- Ø Merge
- 2 Std. 2 Min.
- Gemergte PRs (30 T.)
- 1
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus fsprojects/SQLProvider
-
enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
fsprojects/SQLProvider#872 · 2 Kommentare ·
-
Repo Assist? Offenenhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 10/100
fsprojects/SQLProvider#870 · 1 Kommentar ·
-
postgresql
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 58/100
fsprojects/SQLProvider#869 · 2 Kommentare ·
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 42/100
fsprojects/SQLProvider#868 · 2 Kommentare ·
-
sql server
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
fsprojects/SQLProvider#851 · 1 Kommentar ·
Alle Issues in fsprojects/SQLProvider
Ähnliche Issues
-
[Documentation Request] vLLM kv_load_failure_policy doesn't apply to load failures in L2 adapters Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
DATABASE_URL=pglite:memory: creates a directory named 'memory:' instead of an in-memory database Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
BuilderIO/agent-native#5730 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
duckdb/duckdb-wasm#2258 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
supabase/agent-skills#602 ·