Firebase Firestore Tutorial #7 - Ordering Data

Firebase Firestore Tutorial #7 - Ordering Data

Net Ninja

6 лет назад

81,141 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@pixlphotography5982
@pixlphotography5982 - 30.08.2022 13:02

How to order based on latest to oldest?? Any method for that??

Ответить
@devilzwishbone
@devilzwishbone - 17.04.2022 15:11

For those viewers with limited experience in programming and want to know why the capitalisation comes before lower case, it is all to do with the ASCII table.
In which each character is defined as 1 byte of data, accounting for 128 (0 though to 127) standard and 255 (128 though to 255) when the extended ascii is included.

The letter A as an upper case is represented as 065 (Binary: 01000001) whilst lower case is 097 (Binary: 01100001)
As you can tell from the binary, these numbers are not randomly choosen, they were done to
Since 65 comes before 97, then all upper case letters will be processed first followed by lower cases second.

A byte's maximum value is 2 to the power of 8 which is 256

The solution would be to pre-process the data
Ie, if you 100% know that the data for that cell or field, is going to be a noun, then you would simply write a function that converts the string into a format that represents a noun, this being a book title would contain a capital letter for the first letter, followed by a capilisation per character after each space character
You would then return this value and store it in the NoSQL

Ответить
@AS-nv2kx
@AS-nv2kx - 15.04.2022 16:55

thanks ninja very helpful

Ответить
@cybertechzen5411
@cybertechzen5411 - 17.02.2022 18:39

your are the best man

Ответить
@amonafuad9719
@amonafuad9719 - 19.08.2021 13:57

I liked your accent more than the lesson. Can you make videos about English tutorials?

Ответить
@johongirrahimov2343
@johongirrahimov2343 - 07.08.2021 21:24

Are not you and Web Dev Simplified grand-children of Feynman? Coz both of you are GREAT EXPLAINERS!

Ответить
@dominikfrackowiak5170
@dominikfrackowiak5170 - 06.08.2021 10:31

Hello everyone, I need to sort the data stored in a collection by the frequency of occurrence of words used in that collection. Is that possible in firebase? Any ideas how to do that?

Ответить
@eugeniogonzato
@eugeniogonzato - 10.01.2021 13:33

Your video are so interesting and so celar, I love you

Ответить
@fwhsv8306
@fwhsv8306 - 30.12.2020 14:22

Hi, I'm using a dropdown menu to select the field you want to order your data by. But actually it doesn't work, even if I do have an index for each option. Im saving the field value in a variable, which I put into the OrderBy statement. My question is, how I can dynamically reload the data, ordered by the value of my variable? :)

Ответить
@seanl8930
@seanl8930 - 07.12.2020 02:05

These tutorials actually work and are the best ones to use for the HTML CSS and Javascript Techstack. There isn't a good firebase course on the site Udemy yet for this you should create a masterclass on there. You could make a little money on the side too for those who want to enroll in it. But It's amazing you're posting them on here for everyone bravo man, you saved me from my confusion and I understand firebase a lot more now.

Ответить
@chrismedmadzou6911
@chrismedmadzou6911 - 09.11.2020 18:21

thx sir, you save my life

Ответить
@usamamuhammad7395
@usamamuhammad7395 - 07.11.2020 16:55

Can i use 2 order by statements in on one collection like this:
.orderBy("timeStamp", "desc").orderBy("votes", "Asc")

Ответить
@abe10
@abe10 - 07.09.2020 19:45

I believe the way Firebase sorts data is by using the ASCII values of the characters. That's why the words with capital letters came first. ASCII of A-Z = 65-90 and a-z = 97-122.

Ответить
@iraqtech5693
@iraqtech5693 - 20.07.2020 00:08

that was great help..many thanks

Ответить
@shubh_1qr
@shubh_1qr - 25.05.2020 09:23

Thanks bro for the video it solved my problem, Your videos are always very very helpful.....

Ответить
@joaopaulo-ff3vb
@joaopaulo-ff3vb - 25.04.2020 04:18

nice!!! thanks

Ответить
@sebs751
@sebs751 - 21.04.2020 02:53

How to do this with a date instead?

Ответить
@SaintPepsiSanCoca
@SaintPepsiSanCoca - 10.03.2020 07:48

Your tutorials are just so easy to follow and you explain everything it's very pleasant thanks!

Ответить
@VitechOrg
@VitechOrg - 24.02.2020 23:33

Love your videos!, anyone here know how to export Firebase collection or document data to JSON and use a npm package like vue to json-excel for a reporting feature? Maybe adding a Video Tut to this effect on this series? Keep up the great tutorials Shaun!

Ответить
@Elyx0
@Elyx0 - 16.02.2020 00:17

You forgot to mention order by and >=, it's a very specific and important case

Ответить
@xcmdirector7031
@xcmdirector7031 - 23.08.2019 04:11

Thank you!

Ответить
@cnx8377
@cnx8377 - 13.08.2019 14:27

Bro firebase database descending order data query

Ответить
@BigyetiTechnologies
@BigyetiTechnologies - 30.04.2019 02:48

How can one make the sort case-insensitive? As humans are stupid and cannot be trusted to enter their data in the right case.

Ответить
@INKWEON7269
@INKWEON7269 - 11.01.2019 14:22

Thanks!! It's perfect Tutorial!!
And I have a question! How to list in the order of time?

Ответить
@pritpalsingh7186
@pritpalsingh7186 - 06.01.2019 14:24

how can we order by timestamp

Ответить
@karthikd490
@karthikd490 - 13.12.2018 19:56

I could listen to you all day!

Ответить
@DiogoCezarTeixeiraBatista
@DiogoCezarTeixeiraBatista - 05.10.2018 15:11

Hello my Friend ;) I'm from Brazil, and i would like to thanks for all your vídeos, they are amazing. Ninja, i'm following this example of mario plan, and i'm trying to get ordered data for display at dashboard. I'm trying like this: { collection: "projects", orderBy: [['name', 'asc']] } but, it does not work, do you have some trick for this? Thanks a lot! <3

Ответить
@TheChodex
@TheChodex - 02.10.2018 18:52

This looks pretty cool! Thank you for making this tutorial Shaun!

Ответить
@odia-sanatani
@odia-sanatani - 25.08.2018 06:36

awesome lecture thank u sir....

Ответить
@Programming-Fun-With-Hima
@Programming-Fun-With-Hima - 07.06.2018 14:04

At last, you're using vs code, hahaha
You're a very cool teacher Shaun, I really love you <3

Ответить
@Elduque40
@Elduque40 - 07.06.2018 13:15

Been waiting for this like the next release of god of war

Ответить
@kamalhm-dev
@kamalhm-dev - 07.06.2018 12:32

Insta liked

Ответить