dzql 0.5.22 → 0.5.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dzql",
3
- "version": "0.5.22",
3
+ "version": "0.5.23",
4
4
  "description": "PostgreSQL-powered framework with zero boilerplate CRUD operations and real-time WebSocket synchronization",
5
5
  "type": "module",
6
6
  "main": "src/server/index.js",
@@ -1001,6 +1001,7 @@ $$ LANGUAGE plpgsql SECURITY DEFINER;`;
1001
1001
  ${hasNotificationPaths ? `v_notify_users := _resolve_notification_paths_${this.tableName}(p_user_id, to_jsonb(v_result));` : 'v_notify_users := ARRAY[]::INT[];'}
1002
1002
 
1003
1003
  -- Create event for real-time notifications
1004
+ -- Include full record data so _affected_documents can resolve subscription FKs
1004
1005
  INSERT INTO dzql.events (
1005
1006
  table_name,
1006
1007
  op,
@@ -1012,7 +1013,7 @@ $$ LANGUAGE plpgsql SECURITY DEFINER;`;
1012
1013
  '${this.tableName}',
1013
1014
  'delete',
1014
1015
  ${pkBuildObject},
1015
- NULL,
1016
+ to_jsonb(v_result),
1016
1017
  p_user_id,
1017
1018
  v_notify_users
1018
1019
  );`;