No video

Getting Started with Firebase 9 #8 - Ordering Data & Timestamps

  Рет қаралды 56,174

Net Ninja

Net Ninja

2 жыл бұрын

🐱‍👤 Course files:
github.com/iam...
🐱‍👤 My Premium Udemy courses:
thenetninja.co...
thenetninja.co...
thenetninja.co...
thenetninja.co...
🐱‍👤 Get access to all other premium courses on Net Ninja Pro:
netninja.dev/
🐱‍💻 My Social Links:
Facebook - / thenetninjauk
Twitter - / thenetninjauk
Instagram - / thenetninja

Пікірлер: 50
@coder2917
@coder2917 2 жыл бұрын
Trust me guys, Shaun in one of the most clever instructors I've ever seen. thanks, Shaun
@thedrunknmunky6571
@thedrunknmunky6571 2 жыл бұрын
About 3:34 , serverTimestamp is for when the document was created at Firestore, while Timestamp is when you’re entering a certain time. Afaik, Firestore automatically converts a Date() to a Timestamp.
@seanfang398
@seanfang398 2 жыл бұрын
Thank you so much for pointing it out! Thats very helpful
@SvetaSveta-ms4hi
@SvetaSveta-ms4hi 2 жыл бұрын
Finally, I've been waiting for it so damn long! I can't thank you enough! 😍
@Omerko
@Omerko 2 жыл бұрын
It's nice that Firebase makes you add Index, as with Indexing it is much faster to query the database... 😀
@jason-yb9qk
@jason-yb9qk 2 жыл бұрын
when i use orderBy it gives me this error Firestore (9.9.3): Uncaught Error in snapshot listener: {"code":"failed-precondition","name":"FirebaseError"} does anyone know why? thanks
@lucasjarrett6139
@lucasjarrett6139 Жыл бұрын
I am having exactly the same error as soon as I try to add any variation of "orderBy" to my query. Anyone? Help? Note: Even if I create the index manually as it appears in the video above, orderBy does not work... adding orderBy causes an exception with the description posted by Jason above. Update: After further exploration and some testing, I discovered that my orderBy and where clauses are in conflict for some reason unknown to me. The following code works (presumably because I added manual indexing already): // Query Rule Example const rule = where("company", "==", "Papa John's") // Ordering Example const order = orderBy("creationTimestamp") // Querying the Collection Using a Query Rule const querier = query(reference, order) As does this code: // Query Rule Example const rule = where("company", "==", "Papa John's") // Ordering Example const order = orderBy("creationTimestamp") // Querying the Collection Using a Query Rule const querier = query(reference, rule) But THIS code causes the exception identified by Jason: // Query Rule Example const rule = where("company", "==", "Papa John's") // Ordering Example const order = orderBy("creationTimestamp") // Querying the Collection Using a Query Rule const querier = query(reference, rule, order) Halp?
@maskman4821
@maskman4821 2 жыл бұрын
I sincerely hope Shaun could create a paypal/stripe payment tutorial with react/vue/svelte, everybody wants to learn from Shaun, and eagerly wants to start online transaction badly, hopefully Shaun can create such a tutorial/course 🙏🙏🙏
@edisonmondal2798
@edisonmondal2798 2 жыл бұрын
Sir! You have saved my life ❤❤🔥🔥🖤🖤
@sinki3322
@sinki3322 2 ай бұрын
It makes so much sense! Thank you!
@olaitanmichael6025
@olaitanmichael6025 Жыл бұрын
you gave me an answer to months old bug ...thank you so much
@NetNinja
@NetNinja Жыл бұрын
Glad to hear that Olaitan :) thanks for watching
@IliyaDamyanov
@IliyaDamyanov 5 ай бұрын
Very good video.
@tech3425
@tech3425 2 жыл бұрын
Great course! Looking forward to more indepth Firebase 9 courses
@ericjaw
@ericjaw 6 ай бұрын
What does the timestamp format need to be in if you want to add your own arbitrary timestamp? Looks like just the UNIX epoch?
@manoj-k
@manoj-k 2 жыл бұрын
🔥🔥🔥 waiting for next one
@gonzaotc
@gonzaotc 2 жыл бұрын
Incredible usefull series, thanks you a lot!
@m.pashakhoshkebari2045
@m.pashakhoshkebari2045 2 жыл бұрын
Awesome. Thank you so much!
@NetNinja
@NetNinja 2 жыл бұрын
You're very welcome! :)
@riiya7928
@riiya7928 Жыл бұрын
I didn't know Patrick Rothfuss' third book ABC is already out.
@ericametta6964
@ericametta6964 Жыл бұрын
so helpful. thanks.
@NetNinja
@NetNinja Жыл бұрын
Glad it was helpful! Thanks for watching Erica
@BenJackGill
@BenJackGill 2 жыл бұрын
So how do we solve the problem of duplicate books on the front end because onSnapshot is returning it twice (once for the uopdate, and again for when adding the timestamp)?
@andrewclarke6916
@andrewclarke6916 2 жыл бұрын
I'm assuming he's going to cover this problem in the next video when it is released.
@parthipankalayini8
@parthipankalayini8 2 жыл бұрын
💯🔥💯 Tensorflow JS videos?!
@maskman4821
@maskman4821 2 жыл бұрын
That would be a interesting and intriguing topic, we definitely want to learn that from Shaun 😍
@mohamedyoussef8835
@mohamedyoussef8835 2 жыл бұрын
Awesome Tutorial ++++++++++++++++++++ Thank You
@writecode9932
@writecode9932 9 ай бұрын
Hi Shaun, Question: after adding timeStamp we start seeing that document had been read twice... which means we mean we read the that whole document twice.. how the pricing affects this method... will it cost double.. ??? what do you think if we could all our own machine time with data() with unix epoch time then convert as we want with our app ??
@yayitseugene
@yayitseugene 2 жыл бұрын
Hmmm console is not displaying any arrays after I deleted the 'books' collection, but my Firebase console updated my new entries though
@kiche_allan
@kiche_allan 2 жыл бұрын
Hello Ninja. My console is returning an empty array when retrieving data. What can I do
@azermann1
@azermann1 2 жыл бұрын
may be your web pack stops try npm run build in terminal and check again ( if you name "build": "webpack" in scripts which was in package.json)
@kiche_allan
@kiche_allan 2 жыл бұрын
@@azermann1 Thanks
@azermann1
@azermann1 2 жыл бұрын
@@kiche_allan yw
@celesteomalowete7010
@celesteomalowete7010 2 жыл бұрын
Thank youuuuuuuuuuuuuuuuu
@saraha.1336
@saraha.1336 2 жыл бұрын
Can you do sql next
@maskman4821
@maskman4821 2 жыл бұрын
Shaun said he will do supabase tutorial, which is a sql database, you know 😎
@DiyorbekIsmoilov-db7jw
@DiyorbekIsmoilov-db7jw 4 ай бұрын
Finally english
@muhammad_abir
@muhammad_abir 2 жыл бұрын
please include fire auth with this series.....
@difaz2292
@difaz2292 2 жыл бұрын
My console is returning empty array if i use snapshot with orderby query.. If im not using the query, it work perfectly and the array is not empty. Can anyone help me
@unknowninsaan9809
@unknowninsaan9809 6 ай бұрын
can you please show me that code you're using (if you still have it after a year)
@DigitalDaco
@DigitalDaco 2 жыл бұрын
Interesting that asc and desc are case dependent, i noticed when i had title 'Z' appear before 'a' when in ascending order.
@seanfang398
@seanfang398 2 жыл бұрын
well, it is not really case dependent, the real reason you found 'Z' before 'a' in an asc order is because firebase compare different characters by looking up their ASCII codes, and Z is 90, while a is 97, so that's what you got
@DigitalDaco
@DigitalDaco 2 жыл бұрын
@@seanfang398 that makes complete sense, don't know why i didn't think of that at the time
@rajatsharma6137
@rajatsharma6137 2 жыл бұрын
Hi Shaun...Could You please do a series on firebase integration with flutter after the latest changes in firebase configuration...? @shaun
@veniplex
@veniplex 2 жыл бұрын
As of today I get an error when trying to filter with "where" and order by in the same query: "Uncaught Error in snapshot listener: FirebaseError: Order by clause cannot contain a field with an equality filter name". There is no link to create an index. If I remove the where function from the query, it works just fine without creating an index.
@jonmasino1849
@jonmasino1849 2 жыл бұрын
I had this issue too. make sure you are not ordering by the same field that you are passing into the where function. For example, I was passing 'fname' into where and orderBy, but switched it to pass 'lname' into orderBy and this fixed it. The link then popped up in the console and I was able to add the index into firebase. Hope this helped
@derekchan1045
@derekchan1045 Жыл бұрын
@firebase/firestore: Firestore (9.11.0): Uncaught Error in snapshot listener: {"code":"failed-precondition","name":"FirebaseError"} - if anyone is getting this error. You can try to uninstall firebase by running "npm uninstall firebase" on the terminal. Then install an older version of Firebase - "npm install firebase@9.6.11"
@amnaarif9201
@amnaarif9201 2 жыл бұрын
link not popping up keep getting the error --> @firebase/firestore: Firestore (9.9.3): Uncaught Error in snapshot listener: {"code":"failed-precondition","name":"FirebaseError"}
@johnpaullaniran475
@johnpaullaniran475 2 жыл бұрын
same here
@tedthetutor4587
@tedthetutor4587 Жыл бұрын
It appears that in Firebase (9.11.0) the pop-up link to create an index no longer works. I can't find anything on how this works in the new version (newer doesn't necessarily mean better!) By the way, if we had an app that allowed the user to search by any field and order by either asc or desc, would we need to create an index for each one? This could mean setting up dozens of manually created indexes!
Firestore Data Modeling - Five Cool Techniques
11:44
Fireship
Рет қаралды 254 М.
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 6 МЛН
Schoolboy - Часть 2
00:12
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 17 МЛН
If Barbie came to life! 💝
00:37
Meow-some! Reacts
Рет қаралды 56 МЛН
Getting started with Cloud Functions
19:26
Firebase
Рет қаралды 39 М.
Read, Write, Update, Delete | Firebase Realtime Database v10.3 | Javascript
16:48
How To Convert Firestore Timestamp To JavaScript Date
7:37
Appsmith
Рет қаралды 2,7 М.
Using Cloud Firestore For Your REACT Backend 2023 | CRUD App
51:15
Travis Media
Рет қаралды 21 М.
Firebase - Back to the Basics
25:23
Fireship
Рет қаралды 587 М.
The Firebase Realtime Database and Flutter - Firecasts
59:26
Firebase
Рет қаралды 83 М.
I built a chat app in 7 minutes with React & Firebase
8:53
Fireship
Рет қаралды 1,4 МЛН