Fixed View/Edit Data not handling generated columns properly. #9672#9761
Fixed View/Edit Data not handling generated columns properly. #9672#9761RohitBhati8269 wants to merge 1 commit intopgadmin-org:masterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughThese changes implement support for PostgreSQL 12+ generated columns in pgAdmin's data editor. A new SQL template retrieves column metadata including generated column indicators. The save and update logic detects generated columns, excludes them from INSERT/UPDATE operations, and conditionally refetches updated rows to recalculate generated column values. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Client as ResultSet.jsx
participant Server as save_changed_data.py
participant DB as PostgreSQL
User->>Client: Edit row (with generated columns)
Client->>Server: Submit changes (INSERT/UPDATE)
Server->>Server: Detect generated columns
Server->>Server: Remove generated cols from data
alt INSERT Operation
Server->>DB: INSERT (without generated cols)
DB->>DB: Auto-calculate generated values
else UPDATE Operation
Server->>DB: UPDATE (without generated cols)
DB->>DB: Auto-calculate generated values
Server->>DB: SELECT refreshed row
DB->>Server: Return row with recalculated values
end
Server->>Client: Return operation result + refetched data
Client->>Client: Update UI with recalculated generated cols
Client->>User: Display updated row
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.Add a .trivyignore file to your project to customize which findings Trivy reports. |
Summary by CodeRabbit
New Features
Bug Fixes