graphile / graphile/graphile.github.io

Add a note about 'NOT NULL' JSONB 'null'

Offen
#134 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
SCSS
Sterne
27
Forks
126
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

```
create table a (
b jsonb not null default 'null'
);
```
We expose this as "non-nullable", but it's possible to store a JSON 'null' (rather than an SQL null) in the column. PostGraphile doesn't differentiate these, and trusts you'll do the right thing. Otherwise _all_ JSON/JSONB columns would have to be nullable, and that'd not be a pleasant experience.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by locating the PostGraphile documentation section that explains how JSON/JSONB nullability is exposed. Use the SQL example in the issue as the reference, and consider the work done when the documentation notes that a non-nullable JSONB column can still contain a JSON null distinct from an SQL NULL.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
postgresql, sql
Bereich
databases, documentation
Issue-Typ
Dokumentation
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.