Skip to content

Support primary-key "in" queries with a filter condition #47

@darrenklein

Description

@darrenklein

In a query where a == operator is used on a primary key, a filter will be applied as expected - for example, the query

from(p in Person, where: p.id == ^person1.id
  and is_nil(p.first_name))
|> TestRepo.all()

will correctly return an empty list, since the target record does have a value for first_name.

However, the same query will fail if an in operator is used -

from(p in Person, where: p.id in ^[person1.id]
  and is_nil(p.first_name))
|> TestRepo.all()

will return the record, even though no record should be returned due to the filter condition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    to-doFeatures/tasks that we'd like to add to the adapter.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions