groupon/tdsql — pull request #16 by andrewgho (2014-06-18 17:42:42+00:00)
Title: Stop using global @ARGS within run_query()

A minor refactoring to make logic for handling of placeholder variables clearer.

tdsql can be evoked with placeholder variables from the command line, as in the following example:

```
tdsql 'SELECT * FROM userprefs WHERE username = ? AND prefname LIKE ?' 'johndoe' 'email.%'
```

Currently `run_query()` runs this by invisibly referencing the global `@ARGS` variable that is parsed during command line argument parsing, and it ignores any local `@args` passed in by the caller. This coincidentally doesn't matter because if `@ARGS` is populated, we are in a top-level code block where we only ever run a single command; but this change makes the logic clearer and removes the invisible use of global `@ARGS`.