Skip to content

Add external data replication plugin#223

Open
mdp28 wants to merge 1 commit into
outerbase:mainfrom
mdp28:issue-72-replication-plugin
Open

Add external data replication plugin#223
mdp28 wants to merge 1 commit into
outerbase:mainfrom
mdp28:issue-72-replication-plugin

Conversation

@mdp28
Copy link
Copy Markdown

@mdp28 mdp28 commented May 15, 2026

/claim #72

Summary

  • Adds a ReplicationPlugin that pulls configured external tables into the internal StarbaseDB Durable Object SQLite database.
  • Supports selected columns, static where clauses, cursor-based incremental sync, configurable batch size/interval, upsert/replace/insert modes, table-specific manual pulls, and a status endpoint.
  • Persists per-table cursor/run state in internal tmp_starbasedb_replication_* tables.
  • Exports the plugin from @outerbase/starbasedb/plugins and documents usage in plugins/replication/README.md.
  • Fixes plugin beforeQuery chaining so a plugin hook runs once per plugin while preserving chained SQL/params.

Verification

  • corepack pnpm install --frozen-lockfile --ignore-scripts
  • corepack pnpm exec vitest run plugins/replication/index.test.ts src/plugin.test.ts
  • git diff --check

Targeted test result: 2 files passed, 14 tests passed.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant