Skip to content

undefined selector doesn't work in SQLite #6792

@marius-se

Description

@marius-se

I'm using the Capactior SQLite adapter and noticed that a query like this:

const selector: MangoQuerySelector<ValveDocument> = {
  radiator_id: radiatorId,
  replaced_valve_id: undefined, // <--- this is the troublemaker
};

return this.db.valves
  .findOne({ selector })

doesn't return any results: It does however return the correct result when using the IndexedDB adapter. The document I'm trying to find looks exactly the same in both storages (IndexedDB and Capacitor SQLite): In both cases the replaced_valve_id key/value is not present at all.

This is the document in the IndexedDB (as you can see -> no replaced_valve_id):

Image

This is the document in SQLite (also no replaced_valve_id):

Image

If I remove the replaced_valve_id: undefined it'll work correctly with both storage adapters!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions