Тёмный

Local SQLite Database for Expo React Native App with Import and Export Database from Device Files 

MissCoding
Подписаться 8 тыс.
Просмотров 58 тыс.
50% 1

Hi everyone!
Today I am going to show you how to create an app that connects to a local database. I will cover the basic CRUD operations of creating (insert), reading (select), updating (update) and deleting (delete) records. I will also cover creating a table.
Sometimes you may want to import/export your database so I will also cover this.
If you would like to see my expo-sqlite example, the source code is available on my GitHub:
github.com/che...
For the expo-sqlite documentation you can see the expo documentation:
docs.expo.dev/...
To learn about sqlite queries:
www.sqlitetuto...
You’ve clearly come here to learn and a free audible trial allows you to increase your learning potential in situations where you may be hands free like at the gym or on your commute. It allows you to spend more time on theory when you aren’t able to watch a screen, so that you can maximise your screen time to pick up technical skills. Try it for free today:
amzn.to/49NX6Xe
// ABOUT ME
My name is Chelsea and I started studying software engineering in 2010. I have been working commercially full time since 2014 and have been in various positions from graduate developer to tech lead to solution architect.
I'm a full stack developer with a lot of experience in C# and Javascript but my passion is for mobile development; specifically native iOS development and cross platform using React Native.
I always have many things on the go and am always trying out a new side hustle and failing at it; perhaps you can learn from my mistakes!
Please like and subscribe if you enjoyed this video and want to see more like it!
Have any suggestions on topics you would like to learn more about? Please suggest them in the comments... I would love to help you out while doing a bit of learning myself!
// PRODUCTS USED
I use the following products in the creation of my videos:
Boya MM1 Microphone - amzn.to/3uupmOB
A reasonable quality and reasonably sturdy but cost effective microphone that can be used by both DSLR cameras, mobile phones and laptops
Canon 18-55mm Lens - amzn.to/3QYYdLk
A kit lens but a decent quality lens for beginners getting used to a DSLR
Canon EOS Rebel T7 with 18-55mm Lens - amzn.to/3GdRPuq
This is the kit I started with it includes the lens linked above and is a great starter camera.
I love Apple devices... These are the ones I use for my channel content creation:
Apple iPhone 13 - amzn.to/3G8pHcl
A good all round phone, good for Apple development and recording videos with enough high quality features but at a cheaper price point than the pro versions.
Apple MacBook Pro - amzn.to/3MUuPV8
A nice portable computer for working from anywhere and perfect for iOS development
Apple iPad Air - amzn.to/49LvYrY
Really easy to use for graphic design if required for logos as part of my app development or editing the videos on the go.
DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting my channel so I can continue to provide you with free content each week!
//CONTACT:
Please contact me at: hello@tripwiretech.com
//CRAVING MORE:
You can find links to all my different sites and social media over on Linktree: linktr.ee/miss...

Наука

Опубликовано:

 

30 ноя 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 61   
@lanigoespew
@lanigoespew 4 месяца назад
Your content is simple and straight to the point, PLEASE don't stop making React-Native tutorials I'm actually begging hahaha.
@indecisive.m
@indecisive.m 10 месяцев назад
Just wanted to leave a message to say thanks. This helped me so much. The Expo docs for this are really not overly helpful but you walked through it and thanks to you I managed to convert my app from using async storage to this.
@chippandenga6722
@chippandenga6722 Год назад
This was amazing. Phew! So much packed into 38 minutes. Loved the video and its content.💙
@MissCoding
@MissCoding Год назад
Glad it helped!
@andrejkling3886
@andrejkling3886 Месяц назад
Excellent tutorial… thank you 💯
@honoriotovela3029
@honoriotovela3029 3 дня назад
como se ja actualizaram
@kingogamer4358
@kingogamer4358 Год назад
I was really for the need of local database and when i was searching for it you uploaded the video and that really helped aloooot thanks for that video
@isurujn
@isurujn Год назад
I came across your videos when I was searching for React Native tutorials. You have videos on some great topics and your teaching style is great too. Unfortunately I'm not using Expo. I wish there were more videos on React Native CLI as well.
@wanwan-swagg
@wanwan-swagg Год назад
React native have alot of bugs in it. Can't even symlink because it's unsupported.
@sherlockbhone5268
@sherlockbhone5268 Год назад
Thank you, you are a Sage , may you be prosperous and happy
@emmanuelareiza9699
@emmanuelareiza9699 3 месяца назад
Thanks bro suchs a great video you made , Greates wishes from COLOMBIA
@realworldcodingapplications
awesome, learned a lot from this, first time working w database for mobile app! very cool
@emilieclair
@emilieclair Месяц назад
thank you it is very useful but can you update it with the new functionalities of expo-sqlite? thank you, i'm stuggling with the documentation, more promesses are made and they added sync and async to functions. Thank you!
@henriqueantonio3019
@henriqueantonio3019 7 месяцев назад
Thank you very much, here from Brazil :)))
@Sparrow-tn9jj
@Sparrow-tn9jj Год назад
Nice tutorial. Thank you very much
@mrwenr0347
@mrwenr0347 Год назад
Thank you! Very helpful video!❤
@Tony-jr3ki
@Tony-jr3ki Год назад
Thank you for the awesome video. How would you go about accessing the database from different components? Is it necessary to use some sort of global state for that? So we wouldn't create an instance of db access in each component? Or is there some other way to do that?
@mintmikasa
@mintmikasa 4 месяца назад
Nice content! I'm considering using a local or remote database in my app data, mostly for cost reasons. I was wondering how much data is considered "too much" to be stored locally as far as performance and acceptable app sizes go? It's hard to get a gauge of that without actually ingesting my data into my own sqlite db first, so I was wondering if you had any experience with that. Thanks!
@supp3rv1ctor
@supp3rv1ctor 3 месяца назад
Do you know anything about SQLite working perfectly on Expo Go, and after generating a build it doesn't work on the device?
@shehzadpasha6583
@shehzadpasha6583 Год назад
Thank you for explaining SQLite. I followed the steps mentioned in the video, on iOS it works fine, but on Android I am unable to import the database. It exports well, import is done without errors, but the database table shows no record. Any suggestions?
@AK-kq1mk
@AK-kq1mk Год назад
Did you figure it out?
@MunibDalati
@MunibDalati Год назад
same problem here
@failogy
@failogy 4 месяца назад
same problem. pls tell me if you know.
@alirezascript
@alirezascript 18 дней назад
Thanks for that
@Evalionn
@Evalionn Год назад
Hi, Anyone tested this in release build? It’s not working when I build for release
@nunomonteiro9808
@nunomonteiro9808 4 месяца назад
for some reason, i did like you, but i can't get the names from database....
@AKProductionsTelugu
@AKProductionsTelugu 4 месяца назад
😂😂
@ricardoyanez9464
@ricardoyanez9464 Год назад
wow! awesome video, thanks. Good voice.
@argames1578
@argames1578 4 месяца назад
Great Video thank you very much :)
@erdincparlak7092
@erdincparlak7092 Год назад
Teşekkürler. Çok güzel bir bir anlatım.
@jeka2233
@jeka2233 Год назад
Thank you so much for the tutorial miss coding,could you tell me please how to delete the database from sqlite?
@QianZhiwei
@QianZhiwei 2 месяца назад
Cool! Thank you!
@veleskarlsruhe
@veleskarlsruhe Год назад
Hi MissCoding, thank for the video. I was looking for a longer time how do I integrate an SQLite into React Native Expo app. And finally came across to you :). I have an issue TypeError: undefined is not an object (evaluating 'ExponentSQLite.exec') when running the app locally (Windows). On the Snack it runs fine. Do you have any idea what it could be? On the internet is only one (?!) post on this topic, which does not have the solution for an expo managed workflow.
@veleskarlsruhe
@veleskarlsruhe Год назад
Hi again, I solved the issue "ExponentSQLite.exec" by myself. It was about running "npx expo start" in the GitBash-Terminal. As soon as I started the terminal out of the Visual Studio Code everything was fine. I am using the Android simulator
@Evalionn
@Evalionn Год назад
Hii Did you build your app for release?
@veleskarlsruhe
@veleskarlsruhe Год назад
@@Evalionn Hi, no, I am not that far yet.
@AlejandroHernandez-mh5om
@AlejandroHernandez-mh5om Год назад
I hope you can help me, I'm making an app and I have to download information with an API and host it locally, but I have a question, is there any way to know when the information I'm downloading finished and was saved in the SQLite table? By the way, the video is great.
@programmingwithnit5308
@programmingwithnit5308 10 месяцев назад
Thank you so much 🎉❤
@tienphanmemtinh8207
@tienphanmemtinh8207 4 месяца назад
Can you share this demo code ?
@9alotaibi
@9alotaibi Год назад
Greate Work Thank you
@johnkumar958
@johnkumar958 5 месяцев назад
Very useful
@Hari-xu1zb
@Hari-xu1zb Год назад
How to get example.db file path? and how to example.db file open DB browser for Sqlite tool
@desainad
@desainad Год назад
Under which folder does it store the database? If I have to select from an existing database, where should I place this in the project folder? I am using Windows 10.
@Sparrow-tn9jj
@Sparrow-tn9jj Год назад
import * as FileSystem from 'expo-file-system' const FOLDER_PATH = `${FileSystem.documentDirectory}`
@yassinesaid4687
@yassinesaid4687 Год назад
Thank ya sis
@kingogamer4358
@kingogamer4358 Год назад
Can you upload a video on expo in app purchase how to do that thanks in advance
@amiribrahim01
@amiribrahim01 Год назад
thank you
@AlejandroHernandez-mh5om
@AlejandroHernandez-mh5om Год назад
Hello, thank you very much for your tutorial, it is excellent, but I have an error and I don't know what it refers to: [Error: no such table: names (Sqlite code 1 SQLITE_ERROR): , while compiling: SELECT * FROM names, (OS error - 2:No such file or directory)] Could anyone help me
@anyahayes3601
@anyahayes3601 Год назад
Can you show the code surrounding your select statement?
@AlejandroHernandez-mh5om
@AlejandroHernandez-mh5om Год назад
@@anyahayes3601 Hello, thank you for answering, but I have already been able to see what happened, it was my mistake when writing the statement to create the table. Apologies.
@nazmossakib2540
@nazmossakib2540 11 месяцев назад
@@AlejandroHernandez-mh5om I am facing the same problem....can u please help me to fix this?
@Lee95pl
@Lee95pl Год назад
Hey! Thanks for the video, very informative :) It seems that link to your repo is broken.
@MissCoding
@MissCoding Год назад
Thank you very much, I accidentally had it as private but I’ve fixed that now :)
@chrisnk7066
@chrisnk7066 Год назад
Unable to resolve "expo-sqite"
@MissCoding
@MissCoding Год назад
Try expo-sqlite 😀
@xgcwrought3346
@xgcwrought3346 3 месяца назад
Love the content wanna network on linkdin?
@draigan
@draigan Год назад
why does your filetree take up half the screen so u have to keep going back and fourth...
@mikhailman
@mikhailman Год назад
The person is creating a free tutorial on a specific topic helping others with their developer journeys for nothing in return, and the only thing you could come up with is a half-assed critique of their IDE layout? Pathetic.
@user-bf9vq5rt8c
@user-bf9vq5rt8c 6 месяцев назад
What a waste of time
@neerajtangariya4067
@neerajtangariya4067 Год назад
Hey hi , Nice video. In this demo application you've used the expo-sqlite. what if I prefer to use this npm package instead of expo-sqlite? react-native-sqlite-storage because if i use the react native with cli then we have to do lot of configuration with expo in bare application.
@espial5789
@espial5789 8 месяцев назад
Hello, I really liked the video. I ask you a question, I am trying to create 2 tables in the same transaction, is this possible? I do the following: const db = SQLite.openDatabase('acm1pt.db'); var sql = ` CREATE TABLE IF NOT EXISTS users ( guid INTEGER PRIMARY KEY AUTOINCREMENT, id TEXT, user_name TEXT, session TEXT, date_init TEXT ); CREATE TABLE IF NOT EXISTS orders ( guid INTEGER PRIMARY KEY AUTOINCREMENT, id TEXT, account_id TEXT, account_name TEXT, case_number TEXT ); `; db.transaction(tx => { tx.executeSql(sql, [], (tx, result) => { resolve('The database was created ' + name + ' en ' + dbPath); }, (error) => { reject('Error executing SQL query - Error: ' + error.message); }); }); Only the first table is created and the second one is not created....
Далее
What’s the Best React Native Storage Option? 🧐
12:53
10 Must-Have React Native Components 😎
10:12
Просмотров 50 тыс.
Surxondaryoga biz chempionlarimiz bilan yetib keldik!
00:55
How I Built It: $20K/Month Chrome Extension
13:13
Просмотров 10 тыс.
Sign In with Google | React Native Expo | Tutorial 2024
15:11
4 AI Tools That'll Make You a Better Producer
11:00
Просмотров 7 тыс.
React Native Database & User Authentication
27:38
Просмотров 20 тыс.
React Native Crash Course | Build a Complete App
3:24:29
Просмотров 559 тыс.
#samsung #retrophone #nostalgia #x100
0:14
Просмотров 15 млн
Мой новый мега монитор!🤯
1:00
Маленькая батарея в самсунг
0:31