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

Original subtitles

In the last lecture, we have copied at a local data into the fighter store database.

Now in the forest, there we have this structure exchange as its collection and exchange.

Its collection has two data two documents.

Each document is a separate entry we can access.

So we have here a document with a service, and then we have the one document with a product.

Let's go onto in this lecture and let's try to get his data into a refugee application so we can we

can display this data.

OK.

And back to our cold, and if what I will do, I will simply be able exchanges, after all, we don't

need them now.

They'll be getting this data through our database.

Alright, let's also remember the fetch exchanges and from now on guys and especially fire some functionalities

from fires.

Or maybe it will be not clear what this function, what they do.

Generally, if you're looking when you integrate some remote API, such as viruses, or if you are just

beginning with the library, you want to search information in a documentation.

So usually the first step is to search documentation.

So, for example, fires store JavaScript, how to get data or get get the data, for example, and

it should find you Firebase, Google dot com.

Get data with the cloud forest or documentation, and that's the generally step what you need to go

with.

And here you have an example data how you getting a document explanation how to provide some additional

options options with the custom object.

Get a multiple documents from collection.

That's what we are going with.

OK, so you can use their coverage of the collection of.

Or you can specify the collection group, either even and yeah, so that's the way, how what you will

basically €2bn when you're starting with, then you.

Within your package library, whatever, OK, you can find a lot of StackOverflow posts and you can

find a lot of tutorials and so on and so on, but now you are watching one tutorial and I will show

you how to do it.

Exactly.

OK, so they can close it, we can go to gold and here we can import a couple of helper functions in

it that they import clear brackets and what we need exactly is functional.

Get dogs.

OK.

You will import everything from Firebase Powder Store.

Then you need to function to construct a recovery and a one for a collection and group.

OK.

All right now in here, we don't need to console you or anything, we don't need these exchanges like

this.

This will be quite complicated for the beginning.

You need to just get into it.

I will do it also for you.

But first I will prepare the implementation of you will verify it's working and then I will go with

a debugging.

OK, first thing to consider constructing a query in the query.

In the case of the collection, you can construct like a discovery.

Does the functionality have be imported from the fire store up appear?

Remember?

OK, and to the coverage will provide now collection of group, and he will provide from videotape as

you would like to get your exchanges.

So that'll be it's very important here.

We have constructed in our DBI folder in the stories.

This one here.

OK, so here we will provide to the collection group from these DB and the collection and name or so-called

a collection ID, which is the exchanges.

That's the collection Harvey are calling it in the Forrester exchanges here.

So I specify my database called Firestar.

I provide a database and I provided my collection exchanges perfect.

OK, so we have constructed the cavalry, but that this doesn't mean we got any data yet because to

get a data, you need to get a snapshot of the data.

They will do something like this.

You will create a variable you can call.

But of course, these variables can have your optional name, whatever you want to call them.

But basically what you get the real snapshot and here will be actual execution of the query.

You will get your documents and he will specify the query.

And this is a returning promise and it will hover over.

I get dogs who can see their turning promise, and I told you before, whenever you are barking with

a promise, you have to synchronize it, await and async.

If you already have so no issues here.

So not having snap snapshots for guys to recapitulate, create creating the query from Malta based exchange

its collection.

And here we are.

We are asking for a documents.

We are asking for documents here for these two documents.

Well, this collection.

OK, so, Becky, here.

And let's get the data, so this will be quite this can be quite quite interesting to get this data

because they are on the snapshot.

Do you have a document and tree?

And on the document entry, you can access the specific items and you need to call on each item a data

function.

I know some of the right.

So I will shut up first.

Let's prepare it.

Yeah, and it'll be simpler to do it.

A lot better data.

This will be your exchanges, by the way.

What you get here, you will actually get a snapshot on the snapshot you have at documents.

So docs here and you're right here a map function on them.

OK will be mapping through your documents.

Now you'll get each document like this will function normal, that function?

That's it.

Here, you will get that document in the iteration.

You can enable the parentheses because you have only one parameter and the document you want to write

on your document.

And document export expose function called data, which will get your data of your documents of what

you want to return here will be document dot data.

I will separate into it into its own line.

OK, all right, your concert.

Data documented data and I've written here data.

OK, and I will call this not a data about the exchanges.

And then I look at the exchanges here.

OK, so that's how they work on the snapshot, they get the documents, but the documents are on their

website.

I got some issues here, guys.

Oh, I am calling a very error, you can see the very here.

This is a duplicate now, so let's say here exchange query x change Barry.

OK, and here let's get get documents.

Exchange Square.

OK, better.

OK, so we are getting the query, executing the query to get the documents we get to get a snapshot

on a snapshot of a property called dogs is the area you need to map.

Over eight people get a single document and to get a data from a document, you need to call a document

the data.

You need to return it to get that exchanges right and the commit.

Now, let's save it if this will work.

We are kind of successful already, go back here and refresh and yeah, you are getting now officially

your data from five or so databases, not from your local data, because we have many more than perfect.

Now, let's step back then you can debunk all of these structures I'm interested into these are these

are here, the Bagheera here and deep, accurate here.

Deepak, you know, year after year after year on here.

Now, now I will save it, I will go back to browser, inspect the refresh.

Maybe we need to refresh twice to get into the correct break point.

Yes.

So we are getting a snapshot, all this will be kind, this objects with these kind of properties,

but that are not they're easy to read.

But what is and what it's obvious on the snapshot, an evil hover over the snapshot is a dog's here

on a dog.

So you have this area of two documents.

You can see each documents here.

So we want to iterate over them.

So the snapshot dog's able to map over them.

So I will continue the execution.

This arrow here and on the document, I have a data.

OK, data function, so I will execute this function, it will extract me.

All the data specified here.

Into the data variable, so we've been able to continue execution, you will see the data.

OK, so that's the Barcelona, that's exactly data from my database, so now you can see we are constructing

here these exchanges, which is initially undefined and as they are as they are mapping here with a

map function that is creating the new right and the database will be returned here.

Data was your data and here will be added into the area.

So in the case of the first iteration, this Barcelona data will be added into the area so we can imagine

we are constructing here.

All right.

And now we have here this first object with our Barcelona entry, but you could see here and I will

hover over here data.

Barcelona, Spain and this object will be into this area of the exchanges.

OK, now we'll go to the second iteration, I will click here, so again, we are getting here and your

document extracting the new data from it.

This data will be the Berlin, Germany and these entries.

So again, get the data and add the new entry here.

This is the last iteration.

So that object, this completely extracted and you will you will be sent to the extensions here.

OK.

So being able to continue iteration, for example, the idea, a break point, I hope I will get here,

so I'll get a break point on this line in continue execution.

I will get to your exchanges, ravages this the object I just shot with you.

Berlin and Barcelona.

And that's how it works.

Perfect.

And if a lot is this data, guys, you will notice that they are missing ID by the default, you will

not get the idea of the item here.

If you want to ask explicitly for I.D. and it'll do it like this, you need to.

Yeah, document data, you better helps you put this ask here for ID like this and you will get your

document ID and is your Document ID eligibility back the.

OK?

And then even later, from here you are all of the data or ID, and you will district your slice of

a data.

OK.

And it is valuable to get your data, and if you think of it because we can write it in just one line

there, I can just get their document the data and replace it here and I can get the document idea like

this in the document idea.

I can remove this line here.

And if you think of this even more, we have here only one expression of returning.

We can get rid of this bracket.

Bracket a return and we can wrap it into the single quotes in the case by returning the object.

OK, there was nothing wrong with the previous solution about it that we can have a one liner like this

if you want or actually maybe better like this.

Or the corrective able to be.

OK, I like this so you can have a nice one liner this way, or you can.

You can leave it as you had it to before.

No big deal in that you can you can for sure have a return here if it's more more clear what's happening

for you in this way.

This way, I can debate this what I can do about it.

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

object, then you can place the debugger data in.

Now I can just place a debugger here to show you that it is someplace by the debugger.

Go to your browser refresh or maybe two times and you will get your extensions back and you can see

now.

Each extension has also ID here, and that's your ID, which is this idea.

OK and verified, so here I will go to court here and here I'd of my first big changes, for example.

Eight a day.

Eight H and H, C, B, H, C. B. And here, yeah, it's correct.

Oh, a lot of explanations for all of the new stuff, I'm pretty sure you're overwhelmed by all of this

information.

Keep in mind to learn this function like this.

You need to just take a look augmentations if you want to do it by yourself, it's some other packages

in this case.

You are watching my course.

So I will explain you everything, if any, questions stealer.

Something is not clear.

Just ask me and I will provide you even a detailed explanation.

You can save everything we can verify.

The last time that it is working, we are getting our data and we will be able to continue in the next

lecture.

Yes.

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