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
is this the correct way to read from the database in suggestedEntities() for EntityStringQuery
func suggestedEntities()asyncthrows->[PlaceAppEntity]{tryawaitDependencyValues._current.defaultDatabase.read{ db in...}}
because when I try to use: @Dependency(\.defaultDatabase) var database in the function I got: Failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there 👋🏻
is this the correct way to read from the database in
suggestedEntities()forEntityStringQuerybecause when I try to use:
@Dependency(\.defaultDatabase) var databasein the function I got:Failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs)Note that this file is added to a widget also.
Beta Was this translation helpful? Give feedback.
All reactions