Closed noerw closed 3 years ago
Am I right to assume that - for Android - SQLiteDatabaseHelper
is the only place that references the sqlite implementation?
@noerw yes you right
this would be a big win for my team also (swapping in spatiallite specifically)
@micheal-w-wells Thanks for looking at the plugin. The best solution will be to develop a wrapper specifically for sqlite. Would you be interested in developing it or writing a specification as i am not familiar to spatialite? I have to finalize the upgrade to capacitor3 of all my plugins which it taking quite a lot of my time right now plus i will be away the next 3 weeks.
@micheal-w-wells Any news?
hey sorry been heads down on project that goes live soon. i am going to see if i can figure out the jSON extension first, spatialite is goal # 2 but I will for sure try.
From what little time I've had to look, I'd say it is easiest to do on android first given there is already a spatialite version of sqlcipher here https://github.com/sqlcipher/android-database-sqlcipher
Unfortunately there isn't one for ios, although it may be possible to change the implementation still. Web I haven't looked at.
@micheal-w-wells I do not think i will go that route, if it is an integration of spatialite in android or ios it is another capacitor plugin to develop. If it is some specific tables (points, trajectories, curves, linestring, polygons ...) they could be defined on a typescript wrapper using @capacitor-community/sqlite to store the tables and data. if there are some special functions to do some calcs they should be include in the wrapper. you have to write some specs to for that wrapper or to write the wrapper yourself. this as nothing to do with the plugin itself
That seems pretty fair for spatialite specifically. I do think though that at some point down the road it would be cool if this plugin allowed users to swap out arbitrarily the sqlite implementation (be it for spatialite or to turn on some other loadable extension). That's definitely a nice to have that would only be used by a small subset of the plugin users. Given cross platform support of the plugin I understand that would be a bunch of work. You can see how another project does it for iOS specifically here if you ever go down that road: https://github.com/groue/GRDB.swift/blob/master/Documentation/CustomSQLiteBuilds.md
@micheal-w-wells I will close this issue as i will not pursue that route. thanks anyway
Is your feature request related to a problem? Please describe. I store spatial data in my app and want to efficiently query it: I need spatialite.
Describe the solution you'd like For starters, I'd just like to have documentation that shows what needs to be done to change the underlying sqlite implementation. If my request seems a common use case, one could consider ways to make swapping sqlite-implementations easy through packages or similar mechanisms.
Yes I know that currently the binding makes use of sqlcipher-specific features, but that I can work with.