diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2018-01-12 21:22:30 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2018-01-12 21:22:30 +0100 |
| commit | 4963e137a792727554e175f7de668124e2d741d3 (patch) | |
| tree | 2dc7f76e21c51e8a934b892de93cfd7ae1ead92f | |
| parent | 8cf7550c4a8e7a89257d45dfb8591adc29957d06 (diff) | |
| download | cruncher-4963e137a792727554e175f7de668124e2d741d3.tar.gz cruncher-4963e137a792727554e175f7de668124e2d741d3.zip | |
fix Maria 10.2 returning null instead of 0 for nonexistant json attrs
| -rw-r--r-- | worker.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -92,7 +92,7 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { const pad = (i) => i.toString().padStart(3, "0"); if (doCreate) { // insert return active_items.map((i) => - `sum(column_get(${tableName}.item_uses, '${i}' as int)) ` + + `sum(coalesce(column_get(${tableName}.item_uses, '${i}' as int), 0)) ` + `as item_${pad(i)}_use` ).join(",\n"); } else { |
