brianloveswords/streamsql — pull request #14 by andrewhayward (2014-03-21 15:27:37+00:00)
Title: Nested relationships

This adds a new property, `relationshipsDepth`, to the query options, which allows relationships to go more than one level deep (which is the default, and current behaviour). Relationships automatically stop if a circular reference is found, regardless of the depth specified.

It also opens up a few new options for `relationships`:

- **Object** - this is the same as it was, and assumes user specified relationships
- **Boolean** - this is the same as it was, and uses any defined relationships if `true`
- **Number** - assumes you meant `relationshipsDepth`, and uses any defined relationships
- **Array** - uses only the specified relationships, as taken from those defined in the model
- **String** - uses the specified relationship, as taken from those defined in the model

---
I haven't added a test for sqlite, as `4a-get.test.js` is a bit of a mess. Happy to oblige if you want though.