I
I
IvanOne2016-03-15 07:57:54
Java
IvanOne, 2016-03-15 07:57:54

How to convert cursor correctly?

Hey! I'm very new to android development, and doing synchronization with the server, using retrofit2 and gson, and the database as sqlite, using native tools from android.database.sqlite as working with the database. The question arose such there is a table table_1 and there is a table table_2 which is connected with the table table_1. The question is how to correctly execute a join query and convert the whole thing into data suitable for retrofit? As a result, I want to generate json and send it to the server.
Also, when is it worth using libraries such as ActiveAndroid?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Pavlovsky, 2016-03-15
@IvanOne

You need to know SQL, in some projects you can't do without it. If specifically in your task is the goal of saving the content in the database, then I think it's worth looking here .
A more detailed answer to your question in pictures is here . Well, in general, choose the ORM you need and convenient for you and go for it, with native SQL on the support you will die.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question