Skip to content

Instantly share code, notes, and snippets.

@wunki
Created May 15, 2014 14:16
Show Gist options
  • Save wunki/04cac02340405ffd63ee to your computer and use it in GitHub Desktop.
Save wunki/04cac02340405ffd63ee to your computer and use it in GitHub Desktop.
Dynamic ordering with Clojure's yesql.
SELECT * FROM users ORDER BY :order ASC
@krisajenkins
Copy link

Hmm...which DB are you using?

@wunki
Copy link
Author

wunki commented May 15, 2014

@krisajenkins PostgreSQL. Could be that it's my incompetence, but I couldn't get an error, neither would sorting change with different values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment