/claim #72
Adds a lightweight replication plugin that automatically pulls data from a configured external database (PostgreSQL, MySQL, Turso) into the internal local SQLite database.
This implementation deeply integrates with the existing architecture and alarm mechanism without altering the core StarbaseDBDurableObject system:
plugins/replication/index.ts cleanly within ~110 lines.executeExternalQuery mapping logic with INSERT OR REPLACE INTO natively to replicate rows idempotently.cursorColumn (default: id) and state tracking via an automatically provisioned tmp_replication_cursors SQLite table to ensure duplicate data isn’t fetched and replication scales independently per table.do.ts or route handlers.SELECT batching via dynamically mapped cursors.vitest pass on local logic simulating large schema syncs to ensure robust state management during the mapping step.https://github.com/user-attachments/assets/a2d3ace8-fe96-46c1-8b41-6e066006dd0e
voldemort9999
@voldemort9999
Outerbase (YC W23)
@outerbase