Switching Sync Params
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- postgresql, react, sqlite, typescript
Línea de trabajo
Start from the powerSync.connect(connector, { params }) call in the client SDK and trace how a second connect tears down the existing WebSocket stream. The open question is the design of a setParams-style API that updates sync parameters without a full reconnect, so read the 11-comment thread for any decision first. Done means a proposed API and approach agreed with maintainers, not a patch.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
useEffect(() => {
(async () => {
await powerSync.connect(connector, {
params: { projectId },
});
})();
}, [projectId]);
Description
I’m building a project where I use PowerSync to sync a local SQLite database with Postgres via a custom backend connector.
I need to load bucket data based on a projectId attribute, so the idea is that instead of syncing all projects, I only sync the currently opened project.
Right now, every time the user switches projects, I call powerSync.connect(...) again with a new params.
However, this closes the old WebSocket connection and creates a new one, which introduces a noticeable delay before data is available.
Problem
Frequent connect calls just to change parameters aren’t efficient.
Switching projects feels slow because of the teardown + reconnect.
Question / Feature Request
Is there an alternative way to update connection params dynamically (e.g., something like a setParams API) without forcing a full reconnect?.
Thank you !
- Lenguaje dominante
- TypeScript
- Estrellas
- 729
- Forks
- 96
- Merge medio
- 1 d 21 h
- PR fusionados (30 d)
- 27
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de powersync-ja/powersync-js
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
powersync-ja/powersync-js#1159 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Differential watched queries ignore pure reorders (same rows, new ORDER BY) so stale order is servedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
powersync-ja/powersync-js#1156 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
powersync-ja/powersync-js#1144 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
powersync-ja/powersync-js#1131 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
powersync-ja/powersync-js#1130 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de powersync-ja/powersync-js
Issues similares
-
Edit: Tele Posadas HDAbiertocheck:passed streams:edit
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
area:mcp bug has repro platform:vscode regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
anthropics/claude-code#103970 ·
Los mantenedores suelen responder en 1 día
-
skillopt: success-reflect prompt omits the edit schema, so every success-only edit is droppedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Workspace secrets/constants containing "$" are corrupted when resolved in data source optionsAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextAbiertobug javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día