You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-9Lines changed: 6 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -237,18 +237,15 @@ Each queries file will get it's own `Queries` types generated. To allow the quer
237
237
passed around and injected together. For example, if we have a `Library.sql` the following types will be generated:
238
238
```swift
239
239
// Protocol that defines all queries in the file
240
-
let queries: any LibraryQueriesType= database.libraryQueries
240
+
let queries: LibraryQueries= database.libraryQueries
241
241
242
-
// Concrete implementaion
243
-
let concreteType: LibraryQueriesImpl
244
-
245
-
// NO-OP version, can be injected into unit tests/previews
246
-
let noopType: LibraryQueriesNoop
242
+
// Queries that do not talk to a database and just return `nil` or `[]` via `Queries.Just`
243
+
let noopQueries: LibraryQueries = .noop()
247
244
```
248
245
249
-
For the `Noop` queries, we can override any query optionally. Each query be default will return `nil` or an empty `[]`. To override a query you can set it in the initializer.
246
+
For the `noop` queries, we can override any query optionally. Each query be default will return `nil` or an empty `[]`. To override a query you can set it in the initializer.
0 commit comments