Memento Database Tutorial Hot File
// 2. Store only the delta (much smaller!) if (delta) await pool.query( INSERT INTO document_history (document_id, version, snapshot_delta, created_by) VALUES ($1, $2, $3, $4) , [docId, nextVersion, delta, userId] );
};
let state = {}; for (const row of deltas.rows) state = patch(state, row.snapshot_delta); memento database tutorial hot