Skip to content

Instantly share code, notes, and snippets.

@Ayoush
Created February 24, 2020 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ayoush/7529ca04440f2e1e7379045be00a04f4 to your computer and use it in GitHub Desktop.
Save Ayoush/7529ca04440f2e1e7379045be00a04f4 to your computer and use it in GitHub Desktop.
query =
Task
|> join(:inner, [task], project in Project, on: project.id == task.project_id)
|> join(:inner, [task], user_task in UserTask, on: task.id == user_task.task_id)
|> join(:left, [task], time_track in TimeTracking, on: time_track.task_id == task.id)
|> where(^filter_for_tasks_for_criteria(params))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment