Nozbe / WatermelonDB

🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️
https://watermelondb.dev
MIT License
10.33k stars 579 forks source link

Compiling SQLite with extensions into WatermelonDB #1431

Open Stophface opened 1 year ago

Stophface commented 1 year ago

I am thinking about adding extensions of SQLite into WatermelonDB. I am highly interested in extending SQLite with the open source library SpatialLite as well as adding the H3 bindings to SQLite.

When the SpatialLite extension works, WatermelonDB would be the very first library in the react-native environment, that brings the funtionality of a spatial database to react-native.

As a first step, I only want to interact with the new functionalities via the Unsafe SQL Query functionality from WatermelonDB. If that works, one can think about exposing certain functions to JS.

Can anyone (maybe @radex) give a roadmap to how to add SpatialLite to SQLite in the context of WatermelonDB?

ChrisSimoniMBT commented 1 year ago

@nozbe+watermelondb+0.24.0.patch

Here is a patch file that adds unsafe observing to the compiled library. May be of some help with this, may not.

Made and applied with patch-package

davevilela commented 1 year ago

hey @Stophface, any updates?

Stophface commented 1 year ago

@davevilela nope, its not prio right now