All language subtitles for 3. Get data from Firestore

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French Download
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,090 --> 00:00:04,650 In the last lecture, we have copied at a local data into the fighter store database. 2 00:00:05,010 --> 00:00:10,140 Now in the forest, there we have this structure exchange as its collection and exchange. 3 00:00:10,140 --> 00:00:13,020 Its collection has two data two documents. 4 00:00:13,440 --> 00:00:16,200 Each document is a separate entry we can access. 5 00:00:16,590 --> 00:00:21,900 So we have here a document with a service, and then we have the one document with a product. 6 00:00:22,800 --> 00:00:28,810 Let's go onto in this lecture and let's try to get his data into a refugee application so we can we 7 00:00:28,830 --> 00:00:30,090 can display this data. 8 00:00:31,200 --> 00:00:31,650 OK. 9 00:00:32,880 --> 00:00:37,530 And back to our cold, and if what I will do, I will simply be able exchanges, after all, we don't 10 00:00:37,530 --> 00:00:38,160 need them now. 11 00:00:38,910 --> 00:00:41,310 They'll be getting this data through our database. 12 00:00:41,790 --> 00:00:49,920 Alright, let's also remember the fetch exchanges and from now on guys and especially fire some functionalities 13 00:00:49,920 --> 00:00:50,770 from fires. 14 00:00:50,790 --> 00:00:54,480 Or maybe it will be not clear what this function, what they do. 15 00:00:55,110 --> 00:01:00,810 Generally, if you're looking when you integrate some remote API, such as viruses, or if you are just 16 00:01:00,810 --> 00:01:06,090 beginning with the library, you want to search information in a documentation. 17 00:01:06,570 --> 00:01:09,060 So usually the first step is to search documentation. 18 00:01:09,060 --> 00:01:18,720 So, for example, fires store JavaScript, how to get data or get get the data, for example, and 19 00:01:19,110 --> 00:01:21,720 it should find you Firebase, Google dot com. 20 00:01:21,720 --> 00:01:26,320 Get data with the cloud forest or documentation, and that's the generally step what you need to go 21 00:01:26,320 --> 00:01:26,640 with. 22 00:01:27,120 --> 00:01:34,140 And here you have an example data how you getting a document explanation how to provide some additional 23 00:01:34,140 --> 00:01:37,230 options options with the custom object. 24 00:01:38,310 --> 00:01:40,080 Get a multiple documents from collection. 25 00:01:40,080 --> 00:01:41,670 That's what we are going with. 26 00:01:42,450 --> 00:01:44,760 OK, so you can use their coverage of the collection of. 27 00:01:46,060 --> 00:01:52,360 Or you can specify the collection group, either even and yeah, so that's the way, how what you will 28 00:01:52,570 --> 00:01:54,940 basically €2bn when you're starting with, then you. 29 00:01:55,910 --> 00:02:02,390 Within your package library, whatever, OK, you can find a lot of StackOverflow posts and you can 30 00:02:02,390 --> 00:02:07,130 find a lot of tutorials and so on and so on, but now you are watching one tutorial and I will show 31 00:02:07,130 --> 00:02:07,760 you how to do it. 32 00:02:07,760 --> 00:02:08,300 Exactly. 33 00:02:09,880 --> 00:02:16,810 OK, so they can close it, we can go to gold and here we can import a couple of helper functions in 34 00:02:16,810 --> 00:02:21,270 it that they import clear brackets and what we need exactly is functional. 35 00:02:21,280 --> 00:02:22,280 Get dogs. 36 00:02:23,140 --> 00:02:23,450 OK. 37 00:02:23,470 --> 00:02:25,780 You will import everything from Firebase Powder Store. 38 00:02:26,770 --> 00:02:31,450 Then you need to function to construct a recovery and a one for a collection and group. 39 00:02:32,860 --> 00:02:33,220 OK. 40 00:02:35,110 --> 00:02:39,400 All right now in here, we don't need to console you or anything, we don't need these exchanges like 41 00:02:39,400 --> 00:02:39,730 this. 42 00:02:39,790 --> 00:02:41,440 This will be quite complicated for the beginning. 43 00:02:41,440 --> 00:02:42,810 You need to just get into it. 44 00:02:42,820 --> 00:02:44,260 I will do it also for you. 45 00:02:44,260 --> 00:02:49,410 But first I will prepare the implementation of you will verify it's working and then I will go with 46 00:02:49,420 --> 00:02:50,050 a debugging. 47 00:02:51,130 --> 00:02:53,650 OK, first thing to consider constructing a query in the query. 48 00:02:53,650 --> 00:02:56,710 In the case of the collection, you can construct like a discovery. 49 00:02:57,280 --> 00:03:00,490 Does the functionality have be imported from the fire store up appear? 50 00:03:00,550 --> 00:03:01,150 Remember? 51 00:03:02,450 --> 00:03:09,890 OK, and to the coverage will provide now collection of group, and he will provide from videotape as 52 00:03:09,890 --> 00:03:12,110 you would like to get your exchanges. 53 00:03:12,110 --> 00:03:13,940 So that'll be it's very important here. 54 00:03:14,000 --> 00:03:17,910 We have constructed in our DBI folder in the stories. 55 00:03:18,380 --> 00:03:19,100 This one here. 56 00:03:20,870 --> 00:03:29,630 OK, so here we will provide to the collection group from these DB and the collection and name or so-called 57 00:03:29,630 --> 00:03:32,030 a collection ID, which is the exchanges. 58 00:03:33,230 --> 00:03:37,940 That's the collection Harvey are calling it in the Forrester exchanges here. 59 00:03:38,780 --> 00:03:41,510 So I specify my database called Firestar. 60 00:03:41,510 --> 00:03:46,070 I provide a database and I provided my collection exchanges perfect. 61 00:03:48,790 --> 00:03:53,620 OK, so we have constructed the cavalry, but that this doesn't mean we got any data yet because to 62 00:03:53,620 --> 00:03:55,780 get a data, you need to get a snapshot of the data. 63 00:03:55,780 --> 00:03:56,940 They will do something like this. 64 00:03:56,950 --> 00:03:58,350 You will create a variable you can call. 65 00:03:58,390 --> 00:04:02,680 But of course, these variables can have your optional name, whatever you want to call them. 66 00:04:02,690 --> 00:04:08,920 But basically what you get the real snapshot and here will be actual execution of the query. 67 00:04:09,790 --> 00:04:14,400 You will get your documents and he will specify the query. 68 00:04:15,520 --> 00:04:17,890 And this is a returning promise and it will hover over. 69 00:04:17,890 --> 00:04:22,230 I get dogs who can see their turning promise, and I told you before, whenever you are barking with 70 00:04:22,240 --> 00:04:26,890 a promise, you have to synchronize it, await and async. 71 00:04:26,890 --> 00:04:28,690 If you already have so no issues here. 72 00:04:30,220 --> 00:04:36,640 So not having snap snapshots for guys to recapitulate, create creating the query from Malta based exchange 73 00:04:36,640 --> 00:04:37,370 its collection. 74 00:04:37,390 --> 00:04:38,230 And here we are. 75 00:04:38,560 --> 00:04:40,030 We are asking for a documents. 76 00:04:41,150 --> 00:04:43,790 We are asking for documents here for these two documents. 77 00:04:45,790 --> 00:04:46,660 Well, this collection. 78 00:04:48,480 --> 00:04:49,980 OK, so, Becky, here. 79 00:04:51,450 --> 00:04:57,570 And let's get the data, so this will be quite this can be quite quite interesting to get this data 80 00:04:57,570 --> 00:04:59,440 because they are on the snapshot. 81 00:04:59,440 --> 00:05:01,470 Do you have a document and tree? 82 00:05:02,370 --> 00:05:08,340 And on the document entry, you can access the specific items and you need to call on each item a data 83 00:05:08,340 --> 00:05:09,180 function. 84 00:05:09,210 --> 00:05:11,130 I know some of the right. 85 00:05:11,850 --> 00:05:13,500 So I will shut up first. 86 00:05:13,530 --> 00:05:14,190 Let's prepare it. 87 00:05:14,310 --> 00:05:15,990 Yeah, and it'll be simpler to do it. 88 00:05:16,170 --> 00:05:17,400 A lot better data. 89 00:05:18,330 --> 00:05:20,090 This will be your exchanges, by the way. 90 00:05:20,100 --> 00:05:25,950 What you get here, you will actually get a snapshot on the snapshot you have at documents. 91 00:05:25,950 --> 00:05:29,970 So docs here and you're right here a map function on them. 92 00:05:30,690 --> 00:05:32,670 OK will be mapping through your documents. 93 00:05:34,140 --> 00:05:38,720 Now you'll get each document like this will function normal, that function? 94 00:05:38,730 --> 00:05:39,120 That's it. 95 00:05:40,110 --> 00:05:42,390 Here, you will get that document in the iteration. 96 00:05:43,050 --> 00:05:48,300 You can enable the parentheses because you have only one parameter and the document you want to write 97 00:05:48,300 --> 00:05:49,110 on your document. 98 00:05:50,450 --> 00:05:55,340 And document export expose function called data, which will get your data of your documents of what 99 00:05:55,340 --> 00:05:58,760 you want to return here will be document dot data. 100 00:05:59,300 --> 00:06:01,430 I will separate into it into its own line. 101 00:06:03,170 --> 00:06:04,460 OK, all right, your concert. 102 00:06:06,350 --> 00:06:10,280 Data documented data and I've written here data. 103 00:06:12,170 --> 00:06:15,080 OK, and I will call this not a data about the exchanges. 104 00:06:16,300 --> 00:06:17,620 And then I look at the exchanges here. 105 00:06:19,520 --> 00:06:26,240 OK, so that's how they work on the snapshot, they get the documents, but the documents are on their 106 00:06:26,470 --> 00:06:26,870 website. 107 00:06:28,430 --> 00:06:29,930 I got some issues here, guys. 108 00:06:30,290 --> 00:06:33,280 Oh, I am calling a very error, you can see the very here. 109 00:06:33,290 --> 00:06:41,090 This is a duplicate now, so let's say here exchange query x change Barry. 110 00:06:42,030 --> 00:06:44,810 OK, and here let's get get documents. 111 00:06:44,810 --> 00:06:45,650 Exchange Square. 112 00:06:45,980 --> 00:06:46,760 OK, better. 113 00:06:48,570 --> 00:06:53,220 OK, so we are getting the query, executing the query to get the documents we get to get a snapshot 114 00:06:53,220 --> 00:06:56,910 on a snapshot of a property called dogs is the area you need to map. 115 00:06:56,910 --> 00:07:01,100 Over eight people get a single document and to get a data from a document, you need to call a document 116 00:07:01,110 --> 00:07:01,800 the data. 117 00:07:02,370 --> 00:07:06,690 You need to return it to get that exchanges right and the commit. 118 00:07:07,770 --> 00:07:09,300 Now, let's save it if this will work. 119 00:07:09,690 --> 00:07:15,840 We are kind of successful already, go back here and refresh and yeah, you are getting now officially 120 00:07:15,840 --> 00:07:20,910 your data from five or so databases, not from your local data, because we have many more than perfect. 121 00:07:22,540 --> 00:07:27,110 Now, let's step back then you can debunk all of these structures I'm interested into these are these 122 00:07:27,110 --> 00:07:29,920 are here, the Bagheera here and deep, accurate here. 123 00:07:31,930 --> 00:07:35,500 Deepak, you know, year after year after year on here. 124 00:07:37,700 --> 00:07:42,140 Now, now I will save it, I will go back to browser, inspect the refresh. 125 00:07:42,160 --> 00:07:45,700 Maybe we need to refresh twice to get into the correct break point. 126 00:07:45,910 --> 00:07:46,030 Yes. 127 00:07:47,950 --> 00:07:54,700 So we are getting a snapshot, all this will be kind, this objects with these kind of properties, 128 00:07:54,710 --> 00:07:57,220 but that are not they're easy to read. 129 00:07:57,460 --> 00:08:04,090 But what is and what it's obvious on the snapshot, an evil hover over the snapshot is a dog's here 130 00:08:04,330 --> 00:08:04,780 on a dog. 131 00:08:04,780 --> 00:08:06,460 So you have this area of two documents. 132 00:08:06,660 --> 00:08:08,920 You can see each documents here. 133 00:08:10,390 --> 00:08:11,950 So we want to iterate over them. 134 00:08:11,950 --> 00:08:14,200 So the snapshot dog's able to map over them. 135 00:08:14,200 --> 00:08:15,610 So I will continue the execution. 136 00:08:15,610 --> 00:08:19,780 This arrow here and on the document, I have a data. 137 00:08:20,920 --> 00:08:24,880 OK, data function, so I will execute this function, it will extract me. 138 00:08:26,010 --> 00:08:27,510 All the data specified here. 139 00:08:28,770 --> 00:08:33,600 Into the data variable, so we've been able to continue execution, you will see the data. 140 00:08:34,940 --> 00:08:40,640 OK, so that's the Barcelona, that's exactly data from my database, so now you can see we are constructing 141 00:08:40,640 --> 00:08:48,260 here these exchanges, which is initially undefined and as they are as they are mapping here with a 142 00:08:48,260 --> 00:08:52,700 map function that is creating the new right and the database will be returned here. 143 00:08:55,160 --> 00:08:57,670 Data was your data and here will be added into the area. 144 00:08:58,130 --> 00:09:03,350 So in the case of the first iteration, this Barcelona data will be added into the area so we can imagine 145 00:09:03,350 --> 00:09:04,340 we are constructing here. 146 00:09:04,550 --> 00:09:05,000 All right. 147 00:09:05,930 --> 00:09:12,210 And now we have here this first object with our Barcelona entry, but you could see here and I will 148 00:09:12,230 --> 00:09:13,550 hover over here data. 149 00:09:13,850 --> 00:09:17,960 Barcelona, Spain and this object will be into this area of the exchanges. 150 00:09:19,450 --> 00:09:23,650 OK, now we'll go to the second iteration, I will click here, so again, we are getting here and your 151 00:09:23,650 --> 00:09:26,350 document extracting the new data from it. 152 00:09:27,520 --> 00:09:30,200 This data will be the Berlin, Germany and these entries. 153 00:09:30,200 --> 00:09:34,180 So again, get the data and add the new entry here. 154 00:09:34,930 --> 00:09:36,250 This is the last iteration. 155 00:09:36,250 --> 00:09:41,500 So that object, this completely extracted and you will you will be sent to the extensions here. 156 00:09:43,830 --> 00:09:44,220 OK. 157 00:09:45,300 --> 00:09:49,140 So being able to continue iteration, for example, the idea, a break point, I hope I will get here, 158 00:09:49,140 --> 00:09:52,960 so I'll get a break point on this line in continue execution. 159 00:09:52,980 --> 00:09:56,700 I will get to your exchanges, ravages this the object I just shot with you. 160 00:09:58,200 --> 00:09:59,800 Berlin and Barcelona. 161 00:09:59,820 --> 00:10:01,570 And that's how it works. 162 00:10:01,590 --> 00:10:02,070 Perfect. 163 00:10:03,990 --> 00:10:09,030 And if a lot is this data, guys, you will notice that they are missing ID by the default, you will 164 00:10:09,030 --> 00:10:10,980 not get the idea of the item here. 165 00:10:11,850 --> 00:10:16,050 If you want to ask explicitly for I.D. and it'll do it like this, you need to. 166 00:10:17,890 --> 00:10:23,560 Yeah, document data, you better helps you put this ask here for ID like this and you will get your 167 00:10:23,560 --> 00:10:27,700 document ID and is your Document ID eligibility back the. 168 00:10:30,070 --> 00:10:30,490 OK? 169 00:10:30,490 --> 00:10:36,320 And then even later, from here you are all of the data or ID, and you will district your slice of 170 00:10:36,320 --> 00:10:36,820 a data. 171 00:10:38,410 --> 00:10:38,770 OK. 172 00:10:39,760 --> 00:10:44,230 And it is valuable to get your data, and if you think of it because we can write it in just one line 173 00:10:44,230 --> 00:10:50,260 there, I can just get their document the data and replace it here and I can get the document idea like 174 00:10:50,260 --> 00:10:52,580 this in the document idea. 175 00:10:52,580 --> 00:10:53,830 I can remove this line here. 176 00:10:55,330 --> 00:10:59,050 And if you think of this even more, we have here only one expression of returning. 177 00:10:59,050 --> 00:11:00,580 We can get rid of this bracket. 178 00:11:01,750 --> 00:11:07,240 Bracket a return and we can wrap it into the single quotes in the case by returning the object. 179 00:11:08,540 --> 00:11:13,310 OK, there was nothing wrong with the previous solution about it that we can have a one liner like this 180 00:11:13,310 --> 00:11:16,430 if you want or actually maybe better like this. 181 00:11:19,520 --> 00:11:23,150 Or the corrective able to be. 182 00:11:25,800 --> 00:11:30,150 OK, I like this so you can have a nice one liner this way, or you can. 183 00:11:30,450 --> 00:11:31,980 You can leave it as you had it to before. 184 00:11:32,010 --> 00:11:37,650 No big deal in that you can you can for sure have a return here if it's more more clear what's happening 185 00:11:37,650 --> 00:11:38,760 for you in this way. 186 00:11:39,540 --> 00:11:41,760 This way, I can debate this what I can do about it. 187 00:11:41,940 --> 00:11:46,650 You can see I don't have a place to place a debugger in the line, so if you have a return on your entering 188 00:11:46,650 --> 00:11:50,730 object, then you can place the debugger data in. 189 00:11:50,970 --> 00:11:54,520 Now I can just place a debugger here to show you that it is someplace by the debugger. 190 00:11:55,590 --> 00:12:01,530 Go to your browser refresh or maybe two times and you will get your extensions back and you can see 191 00:12:01,530 --> 00:12:01,730 now. 192 00:12:01,770 --> 00:12:07,520 Each extension has also ID here, and that's your ID, which is this idea. 193 00:12:08,910 --> 00:12:14,320 OK and verified, so here I will go to court here and here I'd of my first big changes, for example. 194 00:12:14,950 --> 00:12:17,050 Eight a day. 195 00:12:18,160 --> 00:12:24,100 Eight H and H, C, B, H, C. B. And here, yeah, it's correct. 196 00:12:26,050 --> 00:12:31,330 Oh, a lot of explanations for all of the new stuff, I'm pretty sure you're overwhelmed by all of this 197 00:12:31,330 --> 00:12:32,090 information. 198 00:12:32,680 --> 00:12:35,170 Keep in mind to learn this function like this. 199 00:12:35,170 --> 00:12:38,830 You need to just take a look augmentations if you want to do it by yourself, it's some other packages 200 00:12:38,830 --> 00:12:39,490 in this case. 201 00:12:39,820 --> 00:12:41,230 You are watching my course. 202 00:12:41,800 --> 00:12:45,370 So I will explain you everything, if any, questions stealer. 203 00:12:45,520 --> 00:12:46,520 Something is not clear. 204 00:12:46,570 --> 00:12:50,920 Just ask me and I will provide you even a detailed explanation. 205 00:12:51,640 --> 00:12:53,200 You can save everything we can verify. 206 00:12:53,530 --> 00:12:58,780 The last time that it is working, we are getting our data and we will be able to continue in the next 207 00:12:58,780 --> 00:12:59,320 lecture. 208 00:12:59,680 --> 00:13:00,040 Yes. 19616

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.