We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the count_my_schemas function, to receive search and filter parameters.
count_my_schemas
def count_my_schemas(field \\ :id) do Repo.aggregate(MySchema, :count, field) end
Something like that:
def count_my_schemas(params \\ %{}) do search = params[:search] search_fields = params[:search_fields] || [] filters = params[:filters] || %{} MySchema |> Crudry.Query.search(search, search_fields) |> Crudry.Query.filter(filters) |> Repo.count() end
The text was updated successfully, but these errors were encountered:
Sounds good!
Small thing: there's no Repo.count function, and I think we should still accept the field to be counted as argument
Repo.count
Sorry, something went wrong.
No branches or pull requests
Change the
count_my_schemas
function, to receive search and filter parameters.Something like that:
The text was updated successfully, but these errors were encountered: