Ionic Vue + SQLite (capacitor-community/sqlite)

does anyone has experience with Ionic Vue and capacitor SQLite like with this package for example?
it only works on Android. iOS and Electron which makes it slow to debug and so far I couldn’t get it to run since I always get the exception TypeError: db.isExists is not a function . however I am using the example code from the git. the db connections looks like created correctly with

const db = await sqlite.createConnection("testNew", false, "no-encryption", 1);
but then the above error is thrown in any function which is called on db. however db is actually an successfully created db object

I don’t know how to progress. has anyone a working sample of Ionic Vue + SQLite with a query functionality or knows my problem? are there alternatives?
I am using Vue3 + capacitor-community/sqlite@2.9.9 + vue-sqlite-hook@1.0.0

I forgot to register the plugin in my main android activity (see package description). it looks like it works now. looking forward working with the package

2 Likes

Hello farfalla,
Could you please share your piece of code.
i didn’t find any resources for ionic vue sqlite and i’m struggling now
Thanks

see my first post. the package site is a very good way to start your Ionic Vue sqlite project. it also has a starter app project up on GitHub which you can download and some How To instructions and an API manual

What do you mean by “register the function”? Can you post a code sample of what you put into the Main Activity?

whole free preview from my course on vuejs and sqlite - Ionic Framework with VueJS: Build a CRUD App Using SQLite - (1) Introduction - YouTube