8000 Add row editing, row CRUD and multi-column filtering by nasry · Pull Request #875 · sosedoff/pgweb · GitHub
[go: up one dir, main page]

Skip to content

Add row editing, row CRUD and multi-column filtering - #875

Open
nasry wants to merge 1 commit into
sosedoff:mainfrom
nasry:feature/row-editing-and-filtering
Open

nasry wants to merge 1 commit into
sosedoff:mainfrom
nasry:feature/row-editing-and-filtering

Conversation

@nasry
@nasry nasry commented Oct 29, 2026
Copy link
Copy Markdown

Introduces three optional features that let non-SQL users browse and modify data without writing statements, while leaving existing pgweb behaviour untouched.

  • Inline cell editing: double-click an editable cell to edit in place. Enter saves, Escape cancels, modified cells are highlighted and only the changed row is patched in the UI - no full table refresh.
  • Row management: New / Edit / Delete actions backed by a modal form generated from table metadata, with composite primary key support and a confirmation summary before deletion.
  • Multi-column filtering: stack conditions with =, !=, >, >=, <, <=, LIKE, ILIKE, IN, IS NULL and IS NOT NULL, combined with AND. Filters render as removable chips and are pushed down to PostgreSQL so pagination and large tables are unaffected.

All statements are built as parameterized queries. Column names are validated against cached table metadata and identifiers are quoted, so user input never reaches SQL as text. Metadata is cached per connection (bounded at 256 entries) to avoid repeated schema lookups.

Row editing is enabled by default and can be turned off with --no-row-editing / PGWEB_NO_ROW_EDITING. It is also disabled automatically in read-only mode.

Adds unit tests for the metadata, filter and CRUD builders, integration tests for the row endpoints, and API-level handler tests.

Introduces three optional features that let non-SQL users browse and
modify data without writing statements, while leaving existing pgweb
behaviour untouched.

* Inline cell editing: double-click an editable cell to edit in place.
  Enter saves, Escape cancels, modified cells are highlighted and only
  the changed row is patched in the UI - no full table refresh.
* Row management: New / Edit / Delete actions backed by a modal form
  generated from table metadata, with composite primary key support and
  a confirmation summary before deletion.
* Multi-column filtering: stack conditions with =, !=, >, >=, <, <=,
  LIKE, ILIKE, IN, IS NULL and IS NOT NULL, combined with AND. Filters
  render as removable chips and are pushed down to PostgreSQL so
  pagination and large tables are unaffected.

All statements are built as parameterized queries. Column names are
validated against cached table metadata and identifiers are quoted, so
user input never reaches SQL as text. Metadata is cached per connection
(bounded at 256 entries) to avoid repeated schema lookups.

Row editing is enabled by default and can be turned off with
--no-row-editing / PGWEB_NO_ROW_EDITING. It is also disabled
automatically in read-only mode.

Adds unit tests for the metadata, filter and CRUD builders, integration
tests for the row endpoints, and API-level handler tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0