Тёмный

Moor (Room for Flutter) #2 - Advanced Queries & DAOs - Fluent SQLite Database 

Reso Coder
Подписаться 113 тыс.
Просмотров 22 тыс.
50% 1

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

 

22 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@Hugamestricks
@Hugamestricks 4 года назад
This series of videos help me a lot! Subscribed and still waiting for more, Excellent!
@JKPedapudi
@JKPedapudi 5 лет назад
Thank you very much for the Awesome videos. Do you have a tutorial for using VS Code shortcuts when using Flutter & Dart
@AkshayTaru
@AkshayTaru 3 года назад
Question: Can you have Table and Dao class and Database Class in different file, Just to keep it clean? If yes How?
@enafor99
@enafor99 5 лет назад
Thank you for this awesome tutorial!
@kirill4531
@kirill4531 3 года назад
how do you pass arguments if you choose to generate custom queries using annotation? where does annotation receive the arguments?
@mehedihasansony
@mehedihasansony 4 года назад
is it necessary to use moor if i am comfortable with raw query? and how about the performance does it has any affect in doing so?
@diveshnaik2248
@diveshnaik2248 4 года назад
Hi there....i just love your videos. Can u tell how to execute this query "Select max(tran_id) from transaction"; i want to get only single id from the table. Thank you
@PankajNikam
@PankajNikam 5 лет назад
Hi, thank you so much for such great tutorial. One doubt though - why did you add the where clause after the order statement at 15:14? I believe that the ordering should be done with the least data available and I would have approached it with where first and then order by. Can you please guide?
@function1983
@function1983 4 года назад
I believe you are right. This part bugs me also. But overall it's a very well made tutorial. Kudo to the creator of this video.
@Gabzim
@Gabzim 2 года назад
super late to this but he’s just constructing the SQL statement. It doesn’t mean that the operations will happen in this order, that’s up to the database engine to decide. Once he’s done adding all the parts of the SQL statement, it’s sent to the engine and then it will filter first and then order.
@PankajNikam
@PankajNikam 2 года назад
@@Gabzim Thanks for the update. I completely forgot the optimization layer which must be present.
@YasinIlhan61
@YasinIlhan61 5 лет назад
Thanks for this tut. Can you create tutorial google sign in with provider package?
@TareqAlmadhoun
@TareqAlmadhoun 5 лет назад
thanks.. great tutorials
@safdhersahai894
@safdhersahai894 4 года назад
Hi, Good Tutorials.... I have a Doubt.. when i place & simbol (AND condition) in my code this shows syntax error.. how can I solve this issue? "select(animals)..where((a) => a.isMammal.not() & a.amountOfLegs.equals(4))"
@sohedulislam1652
@sohedulislam1652 5 лет назад
How to call custome query function and native query eg, "select * from mytable" from my dart function or flutter UI.
@rubinbajracharya9319
@rubinbajracharya9319 5 лет назад
Hi there, how can i perform SELECT SUM(price) FROM TABLE_NAME WHERE completed = 1; in moor. From the Video I can only see that the query returns List/More than one rows.
@function1983
@function1983 4 года назад
moor_flutter 2.0.0 return customSelectQuery( "SELECT SUM(${carts.price.$name}) as total from ${carts.$tableName} WHERE ${carts.completed.$name} = ?''', variables: [Variable.withBool(true)], readsFrom: {carts}, ).getSingle().then((row) => row.data["total"] as double);
@gajendrapandeya5081
@gajendrapandeya5081 2 года назад
so my problem was I made id as autoincreament and set isCompleted field's default value to be false. but while inserting a new task in onSubmit callback it requires to pass both id and isCompleted columns as they are required field in generated dart file What i did is, I modified generated dart file by setting isCompleted = false and id = 1. On doing this, my app run sucessfully. But this doesnot allow me to add another task as there can't be two task with same id. How do i solve this error? I copied everthing from resocoder website
@toBeABetterTranslator
@toBeABetterTranslator 4 года назад
They now recommend using moor ffi, which doesn't fit in this video. Any advice?
@gabrieldragone
@gabrieldragone 4 года назад
Can someone show me an example to make manual select in moor? Something that run this query "Select field1, field2, field3 from table where field1 = null"?
@alixsonpl7973
@alixsonpl7973 3 года назад
customSelectStream is removed from moor. What function should I use? customSelectQuery also deprecated
@alixsonpl7973
@alixsonpl7973 3 года назад
final query = customSelect('SELECT * FROM tasks WHERE completed = 1 ORDER BY due_date DESC, name;', readsFrom: {tasks},); return query .map((row) => Task.fromData(row.data, db)).watch();
@AliKhan-tu8pv
@AliKhan-tu8pv 5 лет назад
body: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text("love your videos ♥️"), ], ), ),
@VimalMistry10
@VimalMistry10 5 лет назад
How to check data is already in database and update otherwise create new.??
@irperera
@irperera 5 лет назад
how do you empty the table created with moor?
@function1983
@function1983 4 года назад
Future clearTables() { return transaction(() async { await customUpdate( 'DELETE from ${tasks.$tableName}', updates: {tasks}, ); .... clear other tables.... }); } There could be better ways in moor. But this works for me.
@bisnake
@bisnake 4 года назад
i tried to update with Companion and still request my nullable fields ::(
@amit.jangid
@amit.jangid 5 лет назад
Hi, How can I perform check for more than one columns in where clause?
@function1983
@function1983 4 года назад
did you try select(tasks) ..where((t)=>column_1_condition) ..where((t)=>column_2_condition) OR you could use moor's customSelectQuery for more query flexibility
@mulletman1705
@mulletman1705 2 года назад
This seems over engineered to the extream compared to a package like swlfite
Далее
Paint Projects
00:17
Просмотров 4,1 млн
Top 12 Flutter Tips & Tricks
9:32
Просмотров 269 тыс.
Create Responsive Flutter Apps with Minimal Effort
43:10