Sqlite.getMaybeOne is currently implemented using getAll. This can be very inefficient when the underlying query returns many results, as all of them will be returned and decoded before the function fails with a ManyResults error.
Instead, we should make use of the underlying sqlite.iterate, which returns a JavaScript iterator. We should use this to decode the first result, then check if next().done is true.
Sqlite.getMaybeOneis currently implemented usinggetAll. This can be very inefficient when the underlying query returns many results, as all of them will be returned and decoded before the function fails with aManyResultserror.Instead, we should make use of the underlying
sqlite.iterate, which returns a JavaScript iterator. We should use this to decode the first result, then check ifnext().doneis true.