Skip to content
/ que Public

Inspect Ecto queries when IO.inspect isn't good enough

Notifications You must be signed in to change notification settings

aerosol/que

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Que

Quick and dirty, no hex package yet.

Add the following to deps:

   {:que, github: "aerosol/que"}

Update your Repo (postgres, clickhouse - sql ones) with:

defmodule MyApp.Repo do
   ...
   use Que
end

Update points of interests:

defp aggregate_events(site, query, metrics) do
  from(e in base_event_query(site, query), select: %{})
  |> select_event_metrics(metrics)
  |> ClickhouseRepo.que(label: "select event metrics") # <--
  |> merge_imported(site, query, :aggregate, metrics)
  |> ClickhouseRepo.que(label: "merge imported") # <--
  |> ClickhouseRepo.one()
  |> ClickhouseRepo.que(label: "oooh, the results") # <--
end

Test and enjoy.

About

Inspect Ecto queries when IO.inspect isn't good enough

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages