Skip to content

Instantly share code, notes, and snippets.

@wilig
Created August 7, 2010 17:34
Show Gist options
  • Save wilig/513011 to your computer and use it in GitHub Desktop.
Save wilig/513011 to your computer and use it in GitHub Desktop.
sequel> (collect :projects)
"select * from projects"
sequel> (collect :projects :invoices)
"select * from projects, invoices"
sequel> (collect :projects :invoices [:projects/id :projects/name (as :inv_id :invoices/id) :invoices/date])
"select projects.id, projects.name, invoices.id AS inv_id, invoices.date from projects, invoices"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment