How to use SQLite in Ionic with Capacitor
HTML-код
- Опубликовано: 28 сен 2024
- Learn to add SQLite with Capacitor to your Ionic app to create offline apps with their own SQL Database included!
🔥 Learn Ionic FAST: ionicacademy.com/
👨💻 Full tutorial: ionicacademy.c...
#############################
❤️ You can also find me on:
Twitter: / schlimmson
TikTok: / simongrimm_
Instagram: / simongrimm_
#############################
Learn to build epic IONIC apps FAST by joining the Ionic Academy: ionicacademy.com/
aren't your Insert/delete queries prone for sql injection? also, why do you pass id as string in "updateUserById" when id in db schema is integer?
Obviously. This is for storing app data not vulnerable data. You are giving whole sqlite data to user through app.
For private data, u need to host own api and consume on frontend
Great video Simon! I believe that the best approach for sharing the private signal from the service is creating a public property that returns computed(this.users) or computed( () => this.users()); that way you get a read only version of the signal. Keep up the good work!
Yes indeed good idea Juan!
I need help with my app I’m working on. And unsure if I will get what I need if I sign up with your website.
We have a private Discord channel for support of Ionic Academy members, yes!
tanks for it ! I'm trying to make two pages (listeOfClients and AddClientForm) but when I try to add clients and go back to the listeClient page, nothing got from the DBB. But when i implement the addclientform in the same page of listOfclients it works... Thank for your help.
Thank you for using signals
You're welcome!
Hi @Simon , wich extension did you use for generate code automatic. I special part of the video you say " uu compile you are very smart" wich extension is that?
That must be Github Copilot!
How can I use the upgrade statement function to modify table structure for users that also have the app running?
wow this is great! SQL! I lv it
this is what I was looking for😀
Hi Simon,
I was wondering if you know of any ORM framework for Ionic (with Capacitor) that is compatible with Sqlite?
Thank you!
I'm also still looking for the best way to handle this, usually Prisma covers most cases..
I think TypeORM might be what you are looking for
excuse me but i want to know the difference between sqlite and mysql sever (like phpmyadmin). is it not possible to use mysql server and ionuc capacitor?
If you have a MySQL server you need an API to connect to the database from any app/website. SQLite is already bundled with any native app and can be used local and offline directly!
@@galaxies_dev it is very difficult for me to send data from ionic react capacitor page to my api
Do you have a guide to how to upload file?
how do i use an existing .db file -- currently it is in the assets folder ? how can I run a .sql file?
you fix the problem or not ?
@@saadnatiqnori6543 yes
@@saadnatiqnori6543 If you need any pointers, I can help
what is that extension that suggests the code? anyone?
copilot
The fact you expect us to send your code to gpt to convert to React and don't provide the code make everything harder
Please please do it in react without typescript
Awesome tutorial, thanls!
This example doesn't work with web applications.
You read my mind, Simon. I am just looking for tutorials on SQLite. Thank you!
Happy to help!
Great video! Thanks a lot for all your content, Simon :) cheers from Argentina
My pleasure Juan!
The sqlite introduced in the video is not the sqlite generally referred to. There is no sqlite file, rather this ionic sqlite is stored in the indexeddb. The naming is very confusing.
thanks, but what about the synchronization with a remote DB? for example each 5 minutes to sync the locally stored DATA with the Remote DB
Man you're the best, but i got an error message, reading the query property, I think it's caused by the newUser=' '
did you solve it ?
I have a problem, I follow the same steps but to React and by some reason the database dont work, the function is like dont be called
Same
in my physical phone, it just showed the navbar, the rest is blank white screen. Why?
i have this same error, did you end up fixing it?
Yo my guy, you probs figured it out, but this guy fails to mention that there needs to be at least one entry in the db for it to show, he also forgets to show that he added an input to add new users, i just added them in and now it works like his.
@@JakebKnowles i forgot to fix it. May I see the github repo of it? Thanks