brianc/node-sql — pull request #139 by phestermcs (2013-09-13 04:54:14+00:00)
Title: Improved support for mapping javascript properties to columns.

Objects passed to insert, update can use property names, and they get mapped to column names.

If a column's property name different than its sql name, property name used as column alias in generated SELECT statement.

Added boolean columnWhiteList config option for table.define(). For insert, update, if table.columnWhiteList is true and passed object has properties that don't map to columns, they're ignored rather than throwing exceptions.

Added boolean snakeToCamel config option for table.define(). If a column has no explicit 'property' property and table.snakeToCamel is true, column's property is set to its name converted to camelCase; i.e. make_to_camel becomes makeToCamel, and then table.makeToCamel can be used.

Added boolean autoGenerated column config option. For insert and update, columns with autoGenerated == true will be excluded from insert/update

Next pull request will have upsert command implemented (for postgres only). This, along with the above changes simplify moving javascript objects back and forth.