LQL→PostgreSQL transpiler emits unquoted column identifiers in pipeline SQL (mixed-case columns case-fold)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start at RlsPredicateTranspiler.TranslateExistsSubquery and inspect RlsPredicateTranspiler.TriggerGuard.cs, including the QuotePipelineIdentifiersForPostgres workaround. Compare the transpiled PostgreSQL identifiers with the existing DDL quoting, then run PgTriggerGuard_PascalCaseIdentifiers_EnforcedAtRuntime and add the described RLS parity coverage. Done means mixed-case columns work on both SQLite and PostgreSQL and the workaround can be removed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
LQL is database platform INDEPENDENT and must behave identically on every platform it transpiles to (CLAUDE.md mandate). The LQL→PostgreSQL transpilation path emits unquoted column identifiers in pipeline SQL (e.g. filter(fn(m) => m.TenantId = ...) → m.TenantId). PostgreSQL case-folds unquoted identifiers to lowercase, so any schema with mixed-case (quoted) column names fails at runtime with 42703 column does not exist — while the identical LQL works fine on SQLite (case-insensitive identifiers).
Where it bites today
- RLS policy predicates (
RlsPredicateTranspiler.TranslateExistsSubquery): theexists()pipeline path emits bare identifiers. Latent bug for any RLS schema using PascalCase columns on Postgres. - Declarative trigger guards (issue #82): hit this during E2E testing. Worked around in
RlsPredicateTranspiler.TriggerGuard.csviaQuotePipelineIdentifiersForPostgres, which post-processes the transpiled subquery SQL to quote bare identifiers. See regression testPgTriggerGuard_PascalCaseIdentifiers_EnforcedAtRuntimeinPostgresDeclarativeTriggerE2ETests.
Correct fix
The core LQL→SQL transpiler should quote all identifiers it emits for PostgreSQL (matching how the DDL generators already quote), so:
- The
QuotePipelineIdentifiersForPostgresworkaround in the trigger-guard path can be deleted. - The RLS policy
exists()path gets the same fix (currently unprotected). - SQLite/Postgres behaviour is provably identical for mixed-case schemas (add parity E2E tests).
Acceptance
- Same LQL predicate over a PascalCase-column table produces working SQL on both SQLite and Postgres.
- Trigger-guard workaround removed;
PgTriggerGuard_PascalCaseIdentifiers_EnforcedAtRuntimestill green. - New RLS parity test with PascalCase columns green on both platforms.
- Lingua principale
- C#
- Stelle
- 68
- Fork
- 4
- Merge medio
- 50m
- PR unite (30g)
- 2
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Nimblesite/DataProvider
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
Nimblesite/DataProvider#137 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Nimblesite/DataProvider#72 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Nimblesite/DataProvider#121 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Nimblesite/DataProvider#108 ·
I maintainer di solito rispondono entro 1 giorno
-
A check constraint the schema cannot name can never be retired, and keeps enforcing the old ruleAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Nimblesite/DataProvider#107 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Nimblesite/DataProvider
Issue simili
-
kronos:develop:queued priority:P0
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
nopSolutions/nopCommerce#8512 ·
I maintainer di solito rispondono entro 4 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
modelcontextprotocol/csharp-sdk#2061 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno