Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nativescript Adapter issues #152

Open
pedmindset opened this issue Jun 24, 2019 · 3 comments
Open

Nativescript Adapter issues #152

pedmindset opened this issue Jun 24, 2019 · 3 comments
Labels

Comments

@pedmindset
Copy link

@pedmindset pedmindset commented Jun 24, 2019

Is your feature request related to a problem? Please describe.
Having troubles using the native-script adapter. The App doesn't start, on compilation, I get an error uninitialized variable in ios and android just crashes without finishing the build

Describe the solution you'd like
Can there be a different storage adapter since the open source version of the sqlite plugin works on ui thread hence performance issues and i believe the crushes might be from there though not really sure

Describe alternatives you've considered
A file Storage like loki.js or any other reasonable file storage system for javascript

Additional context
Great plugin. Thanks for that..

@ClickSimply
Copy link
Owner

@ClickSimply ClickSimply commented Jun 24, 2019

loki.js is an in memory store only, as far as I know it doesn't support any persistence.

I feel like I can't test nativescript enough, every time I release a new version of the plugin folks are opening a new issue for it in no time.

I just made a new storage backend for nodejs, snap-db. Shouldn't take too much trouble to port it to nativescript, react native or even cordova to replace the SQLite plugins I'm using on all those platforms for nanoSQL. This will let us have performant database persistence without any native code. Should be far more robust.

@pedmindset
Copy link
Author

@pedmindset pedmindset commented Jun 24, 2019

Thanks for the quick response. I see snap-db is an in-house project is there an ETA for possible integration. Also if there is any help I can provide. Thanks

@ClickSimply
Copy link
Owner

@ClickSimply ClickSimply commented Jun 26, 2019

After doing some research Nativescript doesn't have any file append methods, doesn't have any filesystem streaming and also doesn't have position/length based file reading. It's surprising to me that they took the time to build a filesystem module and didn't include these features.

A majority of these features are needed for SnapDB to make sense, it seems the best you could do without building your own native modules is a simple JSON file store.

Putting together a new adapter with a simple JSON data storage would be very simple, should be doable within a week or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.