OP-Engineering / op-sqlite

Fastest SQLite library for react-native by @ospfranco
MIT License
522 stars 32 forks source link

[Question] Does your library support Watermelon or Powersync, the offline first solution? #141

Closed ducpt-bili closed 3 weeks ago

ducpt-bili commented 3 weeks ago

Hi @ospfranco , just want to ask that your library can integrate with two offline first solution WatermelonDb or Powersync. You did really great job with op-sqlite.

Thank you

ospfranco commented 3 weeks ago

Watermelon has it's own SQLite driver which is already JSI. Power sync is a complete different product AFAIK.

ducpt-bili commented 3 weeks ago

hi @ospfranco , i have 2 question more.

  1. Does Watermelon sqlite is good/bad compare to op-sqlite?
  2. Can we using op-sqlite in Watermelon db using db adapter or something else? Have a good day @ospfranco , really appriciate your work on op-sqlite. Thanks
ospfranco commented 3 weeks ago

No, watermelon it's a separate library, closing this.

iliapnmrv commented 3 weeks ago

@ducpt-bili i moved from watermelon db and i'm happy with this library and my users are happy too. This library has high level of abstraction and it gives you a ton of flexibility. I can share my experience if you have any questions

ducpt-bili commented 3 weeks ago

hi @iliapnmrv , for more clear, what are your meaning by "moved from watermelondb", do you not using it and using some replace tool like powersync? Or if you mean you are using watermelondb, how can i use op-sqlite with it? Thank you.

iliapnmrv commented 3 weeks ago

@ducpt-bili We no longer use WatermelonDB. Instead, I implemented server sync using REST APIs. For data requests, you can use RTK Query or React Query with their polling functionality and also websockets, which has worked perfectly for my needs

ducpt-bili commented 3 weeks ago

hi @iliapnmrv , thank you for your response. Just one more question, so i understand you are using op-sqlite on mobile app without any support offline first solution. So on FE side like React Native, do you use any ORM to query data from sqlite? like Kysely, Drizzle? Thank you.

iliapnmrv commented 3 weeks ago

Sorry if im being unclear but I do use op-sqlite as offline first solution. I have the flow like this

  1. I request data from server (around 100k rows in peak)
  2. User uses app completely offline
  3. as soon as internet connection establishes, I sync data using REST apis (both sending and receiving data from server)

I do not use any ORMs, I have quite complex SQL queries, I dont think orms could handle it.

If you have any questions, don't hesitate to ask

ducpt-bili commented 3 weeks ago

hi @iliapnmrv , sorry for being uclear, i mention "offline first solution meaning PowerSync or WatermelonDb", they sit on top of sqlite and do a lot of stuff for you like ORM, handle migration... Op-sqlite have vector search feature that i really want to use in my application, but both of the solutions i meantion above is not support that. Right now maybe i will go with PowerSync solution, because when i ask them, they said they will migrate to Op-sqlite soon. So thank you @iliapnmrv , i'm really appreciate your support.

rkistner commented 3 weeks ago

For the PowerSync side, we're tracking the status of supporting op-sqlite here: https://github.com/powersync-ja/react-native-quick-sqlite/issues/42