Skip to content

feat: add opt-in writable HTTP tables - #12

Merged
sabino merged 5 commits into
mainfrom
feat/writable-native-core
Aug 14, 2026
Merged

feat: add opt-in writable HTTP tables#12
sabino merged 5 commits into
mainfrom
feat/writable-native-core

Conversation

@sabino

@sabino sabino commented Aug 14, 2026

Copy link
Copy Markdown
Owner

What changed

  • implement native PostgreSQL INSERT, UPDATE, and DELETE callbacks
  • map writes to explicit POST/PUT/PATCH/DELETE endpoints while keeping every table read-only by default
  • support typed-column whitelists plus schema-flexible attrs and merge JSONB request bodies
  • URL-encode row identities and reject unsafe or ambiguous path templates
  • retry only HTTP methods with idempotent semantics; POST and PATCH make one attempt
  • exercise POST, PATCH, PUT, DELETE, 204 responses, body filtering, and dynamic JSONB with real PostgreSQL 14-18 integration tests
  • document HTTP transaction boundaries and the current lack of RETURNING

Why

The native FDW could scan read APIs but its framework modification hooks used their no-op defaults. Explicit mutation capabilities turn PostgreSQL into a useful read/write interface for compatible APIs without making accidental writes possible.

The supabase-wrappers dependency remains only a native Rust adapter for PostgreSQL callbacks. This change does not introduce a hosted Supabase dependency or a Wasm execution path.

Validation

  • cargo fmt --all -- --check
  • python3 -m py_compile tests/mock_api.py
  • git diff --check
  • full PostgreSQL 14-18 native matrix delegated to this PR's GitHub Actions to avoid a large local build under current disk pressure

@sabino
sabino marked this pull request as ready for review August 14, 2026 07:32
@sabino
sabino merged commit aa1c9fe into main Aug 14, 2026
7 checks passed
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