Skip to content

Instantly share code, notes, and snippets.

@ThePendulum
Created January 8, 2019 19:15
Show Gist options
  • Save ThePendulum/c42d1d86fc6592d204ed33c9328e8468 to your computer and use it in GitHub Desktop.
Save ThePendulum/c42d1d86fc6592d204ed33c9328e8468 to your computer and use it in GitHub Desktop.
const taskTagsEntries = await knex
.select('tags_available.id', 'tags_available.body', 'tags_available.color', 'tags_available.priority', 'tags_groups.name AS group')
.from('tags_assigned')
.where({ task_id: taskId })
.leftJoin('tags_available', 'tags_assigned.tag_id', 'tags_available.id')
.leftJoin('tags_groups', 'tags_available.group_id', 'tags_groups.id');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment