Font size
Worksheets5. Echo - Query And ORM
Total questions: 11
Worksheet time: 9mins
What's the differences between using "Find" and "First" in GORM?
Both are getting data from databases, but "First" only take a partial data
"Find" only used to get data that available, "First" only get the first data available
"Find" search for a data, and "First" shows all data
Both does the same, to find a data
on dto, user_request.go used to...
maintain the request of client so server can give the correct data
creating a request of data from databases
maintain what does the dto only takes from the data of form body
let user request a data from dto
What does the code on the left do?
To migrate a data from database into server
To migrate a models created into database tables
To automatically migrate every request/response into json values
to handle an error when migration is unhandled/faulty
What does the code on the left do?
To save a data
To update a partial data/all data
To save a data cache
To update the databases state
(a)
Do you agree if we can also use query along with ORM?
Yes, because ORM is also not that perfect
No, we can't use query along with ORM because ORM muchly use Object
If one of the struct use `json:"-"`, will the data shown?
No, it won't
Yes, it will
This line of codes will run if...
The handler is successfully run the repositories and return a data as the reponse
The repositories returning a response
The handler is caught an error
The dto can't receive any data from the request
(a)
(a)
(a)
