electric-sql / electric

Sync little subsets of your Postgres data into local apps and services.
https://electric-sql.com
Apache License 2.0
6.22k stars 147 forks source link

Swift support #1435

Closed pawarren closed 1 month ago

pawarren commented 2 months ago

Love what you're doing, hoping to incorporate it into the iOS-native app we're building at some point, would love to be notified when Swift support is in the works!

(though I totally understand this is a long ways away, what with the rewrite)

KyleAMathews commented 2 months ago

hey! For sure, we'd love you to use Electric with your app! It's true we won't be building a Swift client anytime soon but you should take a quick look at building one yourself as it's dramatically simpler now with the http API. You just query for the shape and then poll for updates. It's really just a while loop!

pawarren commented 1 month ago

Looked into it, but it'll mainly make sense for us once there's support for write patterns! tentative local writes might work, though we really liked the idea of local-writes-are-final from the previous iteration of ElectricSQL.

totally understand it's going to take a while to build back up to that, though!

balegas commented 1 month ago

Here is how we did for PGlite. The code for SQLite should be quite similar. https://github.com/electric-sql/pglite/blob/main/packages/pglite-sync/src/index.ts