tgriesser/knex — pull request #379 by SohumB (2014-07-17 07:48:50+00:00)
Title: Allow nested Raw queries

For context, we wanted to run postgis queries with raw expressions being generated from different parts of the codebase. Stuff that boiled down to things like:

```javascript
.where(knex.raw('ST_Distance_Sphere(?, coordinate) < ?', [
knex.raw('ST_SetSRID(ST_MakePoint(?, ?)', [-80, 150]),
1000
]));
```

Manually combining the query strings every time is pretty horrible :p

But yea, I think splicing them up in the constructor is a fairly reasonable solution to nested raws.

Thoughts?