Answer the question
In order to leave comments, you need to log in
Is it possible to get all tables in Retrofit with one query?
Good. I have a database server with several tables, I need to transfer this data when connecting the application.
As a result, I receive this data from the server, but for each table I write a separate query, i.e. you have to contact the server several times, is it really worth doing this?
Or in this case, you need to create a virtual table?
Answer the question
In order to leave comments, you need to log in
It is possible and one request from the client.
When you contact the server for data, then on the server side you request data from each required table in turn, glue the result into a json like:
{
"table1": {
"field1": value1,
"field2": value2,
...
},
"table2": {
"field1": value1,
"field2": value2,
...
},
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question