brianc/node-sql — pull request #144 by matinm (2013-10-06 21:52:55+00:00)
Title: Add array and Hstore as first-class objects.

* Added array literals:

```javascript
// SELECT ARRAY[1, 2, 3] FROM post
post.select(sql.array(1,2,3)).toString();
```

* Added array slicing:

```javascript
// SELECT (ARRAY[1, 2, 3])[2:3] FROM "post"
post.select(sql.array(1,2,3).slice(2,3)).toString();
```

* Added array indexing:

```javascript
// SELECT (ARRAY[1, 2, 3])[2] FROM "post"
post.select(sql.array(1,2,3).at(2)).toString();
```

* Added Hstore key accessor `->` operator:

```javascript
// SELECT ("post"."metadata" -> 'age') FROM "post"
post.select(post.metadata.key('age'))
```

* Added Hstore/array concat operator `||`:

```javascript
// SELECT ARRAY[1] || HSTORE(x,2) -> 'x' FROM "post"
post.select(sql.array(1).concat(Sql.functions.HSTORE('x',2).key('x'))).toString();
```