CSNW/sql-bricks — pull request #3 by prust (2013-11-24 23:48:58+00:00)
Title: Add basic serialization of arrays

@schuttsm: Could you review?

I added basic serialization of arrays (it just calls `.toString()`, which results in a comma-delimited list).

There's a DRY violation here, I should probably extract this behavior to a shared place (not quite sure where)...

We'll probably eventually need to make this pluggable (for instance, the python sqlite3 module has a `.registerAdapter()` method that allows the user to supply a custom adapter for different types...) I haven't thought about it too much, but whatever we choose, the default behavior probably shouldn't be what it does now (results in invalid SQL). At the very least, we should throw an error if an Array is passed in as a value. That might be best as long as we make it easy for the user to register an adapter that converts arrays to a comma-delimited list or JSON or whatever...