brianc/node-sql — pull request #146 by tmont (2013-10-08 06:37:12+00:00)
Title: Better handling of arrays in query.select()'s arguments

A `TypeError` can occur when running something like:

```javascript
user.select(user.star(), [ user.id, user.name ])
```
due to the way the `getArrayOrArgsAsArray` function handled arrays in `arguments` after the 0th position. Meaning, if there was a non-array in `arguments[0]` and an array in `arguments[1]`, it blew up.

This was also making my star-prefix merge blow up, which I suppose I didn't properly test. Sorry about that. :/

So, now doing something like

```javascript
user.select(user.star(), user.star({ prefix: 'foo' }))
```

should totally work.

I _think_ this shouldn't affect anything else, but I'm not completely certain. Tests are all passing, but I don't know if there's some other variable-arity trickery in `query.select()` that I'm unaware of.