Skip to content

docs: add mapColumns examples - #1098

Open
psh4607 wants to merge 1 commit into
electric-sql:mainfrom
psh4607:docs/GH-475/mapcolumns-examples
Open

docs: add mapColumns examples#1098
psh4607 wants to merge 1 commit into
electric-sql:mainfrom
psh4607:docs/GH-475/mapcolumns-examples

Conversation

@psh4607

@psh4607 psh4607 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

작업 배경

Issue #475 asks for concrete documentation of both supported mapColumns forms, especially the callback that receives an Electric ChangeMessage.

티켓 및 링크

작업 내용

  • Mark mapColumns as optional, matching the current SyncShapeToTableOptions API.
  • Add an object-form example that maps local table columns to shape columns.
  • Add a callback-form example that reads ChangeMessage.value and returns values keyed by local column names.

테스트

  • pnpm --dir docs stylecheck
  • pnpm --dir docs typecheck
  • VitePress Markdown renderer structural check for the option list and both TypeScript code blocks
  • git diff --check
  • pnpm --dir docs build — blocked before page rendering because this fresh worktree does not contain the generated packages/pglite/dist/index.js workspace artifact

@psh4607
psh4607 marked this pull request as ready for review August 25, 2026 02:12
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.

pglite-sync: document mapColumns option, especially the callback version

1 participant