dirtyvagabond/pretty-ql — Issue #1: Can we support sending a var to select?
Author: dirtyvagabond
Created: 2012-02-24 00:18:22+00:00
State: open

Tim wanted to...
(select mytablevar)

where mytablevar was "restaurants-us". Problem is, the select macro expects the var name to be the table name, e.g.:
(select restaurants-us)

For now, Tim is using select* as a decent workaround.

Tim says:
---
so (let [table :places] (data-api/exec (data-api/select* table)))
works
maybe your macro should rather than ~(name table)
check if table is a bound sym
~(if (bound? table) table (name table))
or somth like that
---