jorgebay/node-cassandra-cql — pull request #49 by DanielSmedegaardBuus (2014-01-10 15:51:04+00:00)
Title: Allow undefined values in CQL query args and translate them to NULL

Rather than checking for undefined values in the args array, check that the index exists, and treat undefined values as nulls.

This allows you to automatically treat non-existing members in source data as NULLs when doing inserts, e.g.

// incoming: { id: 1, field1: 'value' }
client.execute('UPDATE data SET field1=?, field2=? WHERE id=?', [incoming.field1, incoming.field2, incoming.id], callback);

Signed-off-by: Daniel Smedegaard Buus