Currently, I am searching for those result which has a state set to a particular value. Following is one of the line from my schema result-
state: :private
My Query-
jobs = JobOpening |> Repo.all(state: String.to_atom(status))
or
jobs = JobOpening |> Repo.all(state: status)
value in status will be like- public, private, archive (in string)
Whatever value be in my status, this query is fetching all the row(data) from the db? Why is not only fetching those row where status is set to some particular value? Your response will be highly appreciable.