You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initially I didn't know this and made a fork in order to get the data I want from the event, but later I found out that you have the data already available in the event object. Maybe you can update the documentation on the event object to include:
let tableMap = event.tableMap[event.tableId]; tableMap.parentSchema tableMap.tableName event.rows //array, also update event has before and after objects
For example, for the update event im getting the data like this: event.rows.forEach(function(row) { Object.keys(row.before).forEach(function(name) { if (row.before[name] !== row.after[name]) { dbUpdate.updatedRows.push({[name]: row.after[name]}); } }); });
Would be useful info for new users.
The text was updated successfully, but these errors were encountered:
Initially I didn't know this and made a fork in order to get the data I want from the event, but later I found out that you have the data already available in the event object. Maybe you can update the documentation on the event object to include:
let tableMap = event.tableMap[event.tableId]; tableMap.parentSchema tableMap.tableName event.rows //array, also update event has before and after objects
For example, for the update event im getting the data like this:
event.rows.forEach(function(row) { Object.keys(row.before).forEach(function(name) { if (row.before[name] !== row.after[name]) { dbUpdate.updatedRows.push({[name]: row.after[name]}); } }); });
Would be useful info for new users.
The text was updated successfully, but these errors were encountered: