Skip to content

Commit 8921346

Browse files
committed
Clarify query nullability comments in examples
1 parent b232d85 commit 8921346

6 files changed

Lines changed: 18 additions & 18 deletions

File tree

apps/web/src/components/EvoluMinimalExample.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ const todosQuery = evolu.createQuery((db) =>
8585
.select(["id", "title", "isCompleted"])
8686
// Soft delete: filter out deleted rows.
8787
.where("isDeleted", "is not", Evolu.sqliteTrue)
88-
// Like GraphQL, all columns except id are nullable in queries (even if
89-
// defined as non-nullable in schema). This enables schema evolution (no
90-
// migrations/versioning). Filter nulls with where + $narrowType.
88+
// Like with GraphQL, all columns except id are nullable in queries
89+
// (even if defined without nullOr in the schema) to allow schema
90+
// evolution without migrations. Filter nulls with where + $narrowType.
9191
.where("title", "is not", null)
9292
.$narrowType<{ title: Evolu.kysely.NotNull }>()
9393
// Columns createdAt, updatedAt, isDeleted are auto-added to all tables.

examples/react-electron/components/EvoluMinimalExample.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ const todosQuery = evolu.createQuery((db) =>
8383
.select(["id", "title", "isCompleted"])
8484
// Soft delete: filter out deleted rows.
8585
.where("isDeleted", "is not", Evolu.sqliteTrue)
86-
// Like GraphQL, all columns except id are nullable in queries (even if
87-
// defined as non-nullable in schema). This enables schema evolution (no
88-
// migrations/versioning). Filter nulls with where + $narrowType.
86+
// Like with GraphQL, all columns except id are nullable in queries
87+
// (even if defined without nullOr in the schema) to allow schema
88+
// evolution without migrations. Filter nulls with where + $narrowType.
8989
.where("title", "is not", null)
9090
.$narrowType<{ title: Evolu.kysely.NotNull }>()
9191
// Columns createdAt, updatedAt, isDeleted are auto-added to all tables.

examples/react-expo/app/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ const EvoluDemo = ({
115115
.select(["id", "title", "isCompleted"])
116116
// Soft delete: filter out deleted rows.
117117
.where("isDeleted", "is not", Evolu.sqliteTrue)
118-
// Like GraphQL, all columns except id are nullable in queries (even if
119-
// defined as non-nullable in schema). This enables schema evolution (no
120-
// migrations/versioning). Filter nulls with where + $narrowType.
118+
// Like with GraphQL, all columns except id are nullable in queries
119+
// (even if defined without nullOr in the schema) to allow schema
120+
// evolution without migrations. Filter nulls with where + $narrowType.
121121
.where("title", "is not", null)
122122
.$narrowType<{ title: Evolu.kysely.NotNull }>()
123123
// Columns createdAt, updatedAt, isDeleted are auto-added to all tables.

examples/react-nextjs/components/EvoluMinimalExample.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ const todosQuery = evolu.createQuery((db) =>
8585
.select(["id", "title", "isCompleted"])
8686
// Soft delete: filter out deleted rows.
8787
.where("isDeleted", "is not", Evolu.sqliteTrue)
88-
// Like GraphQL, all columns except id are nullable in queries (even if
89-
// defined as non-nullable in schema). This enables schema evolution (no
90-
// migrations/versioning). Filter nulls with where + $narrowType.
88+
// Like with GraphQL, all columns except id are nullable in queries
89+
// (even if defined without nullOr in the schema) to allow schema
90+
// evolution without migrations. Filter nulls with where + $narrowType.
9191
.where("title", "is not", null)
9292
.$narrowType<{ title: Evolu.kysely.NotNull }>()
9393
// Columns createdAt, updatedAt, isDeleted are auto-added to all tables.

examples/react-vite-pwa/src/components/EvoluMinimalExample.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ const todosQuery = evolu.createQuery((db) =>
9494
.select(["id", "title", "isCompleted"])
9595
// Soft delete: filter out deleted rows.
9696
.where("isDeleted", "is not", Evolu.sqliteTrue)
97-
// Like GraphQL, all columns except id are nullable in queries (even if
98-
// defined as non-nullable in schema). This enables schema evolution (no
99-
// migrations/versioning). Filter nulls with where + $narrowType.
97+
// Like with GraphQL, all columns except id are nullable in queries
98+
// (even if defined without nullOr in the schema) to allow schema
99+
// evolution without migrations. Filter nulls with where + $narrowType.
100100
.where("title", "is not", null)
101101
.$narrowType<{ title: Evolu.kysely.NotNull }>()
102102
// Columns createdAt, updatedAt, isDeleted are auto-added to all tables.

examples/svelte-vite-pwa/src/App.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
.select(["id", "title", "isCompleted"])
5353
// Soft delete: filter out deleted rows.
5454
.where("isDeleted", "is not", Evolu.sqliteTrue)
55-
// Like GraphQL, all columns except id are nullable in queries (even if
56-
// defined as non-nullable in schema). This enables schema evolution (no
57-
// migrations/versioning). Filter nulls with where + $narrowType.
55+
// Like with GraphQL, all columns except id are nullable in queries
56+
// (even if defined without nullOr in the schema) to allow schema
57+
// evolution without migrations. Filter nulls with where + $narrowType.
5858
.where("title", "is not", null)
5959
.$narrowType<{ title: Evolu.kysely.NotNull }>()
6060
// Columns createdAt, updatedAt, isDeleted are auto-added to all tables.

0 commit comments

Comments
 (0)