Florina Muntenescu introduces Room, the database persistence library for Jetpack. Room allows you to:
* write less boilerplate code
* map query results to objects automatically
* provide compile-time checked queries
* test database operations, including migrations, more easily
* avoid performing any database operations on the main thread
Take a look at the resources below for more information!
Google I/O Room Talk →
Room persistence library guide →
Architecture Components code samples →
Persistence Codelabs →
Incrementally migrate from SQLite to Room →
7 Pro-tips for Room →
Room with a View codelab →
Watch more Android Jetpack videos here →
Subscribe to the Android Developers channel here →
#jetpack #featured
Nguồn: https://u-os.org
Xem thêm bài viết khác: https://u-os.org/cong-nghe
Xem thêm Bài Viết:
- Hướng dẫn cách lắp anten ngoài trời đúng kỹ thuật, thu sóng khỏe nhất
- Giải đáp bí ẩn Xamarin là gì? Ưu và nhược điểm khi sử dụng Xamarin
- Tuyệt chiêu sửa lỗi window photo viewer can’t open this picture because
- Bộ nhớ đệm là gì? Có nên xóa bộ nhớ đệm trên thiết bị không?
- Bật mí 3 cách chụp ảnh bằng máy tính win 7 dễ như ăn kẹo
I'm gonna ask you this one time, where is database builder? i'll do one better, who is database builder? and I'll do one better more, why is database builder?
My entity needed a list and i gave up
how to load and read external database(SDcard )?
Can user dynamically create and delete tables from a database using Room?
It seems like it works only with a predefined set of tables hardcoded by developer.
Android is Awesome And Cool i Got Samsung Galaxy Express Prime 3 from At&t it Got Android 9 pie now
You guys need to clarify your relationships documentation. It's misleading and barely comprehensible. Room is supposed to reduce "boilerplate code" but a single join query requires way too much complex code.
man I love her accent!
The really tricky part is when you want to use on your custom objects and relationships.
make a video to explain @Relation and @Embedded annotations. They are very confusing.
55-55-
Any official programming language for Android (Including Java) deserve a video like this
Seems like Google is anti-boilerplate when it comes to just about anything. Seriously, I have no issues with boilerplates.
Thankyou Sister for your tuto!Can you help me i have this error:cannot access database on the main thread since it may potentially lock the UI for a long time.I use arch components.in the Dao class:@SuppressWarnings(RoomWarnings.CURSOR_MISMATCH)
@Query("SELECT * FROM user_table WHERE email=:email AND mdp=:mdp AND role=:role")
User getUser(String email,String mdp,String role);
,the repository class:public User getUser(String email,String mdp,String role)
{
user=this.userDao.getUser(email,mdp,role);
return user;
} and the viewmodel this:public User getUser(String username,String mdp,String role)
{
return userrepository.getUser(username,mdp,role);
} an i want use it for call it in the mainActivity like this:user=userViewModel.getUser(login,mdp,item);Thankyou!
There is typo:
The method It's not called fallbackToDestructiveMigrationsFrom() but fallbackToDestructiveMigrationFrom()
Without an S in Migration
Awesome job, Florina!
Any ideas about export roomdb data into external Sdcard?
Can we make one to many queries with room?
How can i use a predifined sqlite.db with room? I have search the last hours but i can not find any solution. I think that this must be solved from google except if you already did it and i can not find it!
Hi Florina!!! As i see You are a pretty good at Room stuff in the whole world. Could you please help me understand one aspect of it. I am new at programming Android. So this is my kind of problem i got stuck with. I pretty much understand how this Room works. Anyway, I've got SQLite database file with 1000's of rows of data. And i want my project to fetch data from this .db file and populate RoomDatabase. But all solutions on Stackoverflow seem to fail. Can you show me the way to do it, please? Thank you.
Well, she's Romanian.. But however she's good on English, and you can easly understand, what does she wants to tell to us, and of course I have watched this video not for learning but to impress myself that she is a Romanian and she became a Android Developer and presentator of Google Developers, Yeah she's earning a lot, but i don't take care about it, i also want to become an Android Developer not for money, but to show to people that i can break the ice, i have only 12 years and still understanding this, but however i'm learning everyday a little bit, and with this tempo i will know perfectly java language for android. So if you are an android beginner developer, don't worry about this, everyone was like you when they wanted to start this, soo don't take the Android Studio yet, because it will be hard to understand for you, just go to your phone and download Sketchware from Google Play, (In case that you are a beginner) . In this app you will develop your app also like android studio, but there codes are blocks, and every specific block is an code, but is much easier to understand, soo guys please leave a like on this comment, i hope that i helped you, Thanks
These teeth…
Orm is evil, stay away from it
Maybe the most beautiful Android developer! 🙂
Good job on improving your pronunciation. Keep up the good work!
Where has version 2.0 been published? The Google Maven repository only lists androidx.room 2.0.0-alpha1. Release notes are missing, too.