从数据库检索数据-如何?

时间:2018-11-25 14:39:44

标签: android sqlite session interface retrofit2

当前数据库中有可用数据,我无法提取它们。例如;我想获取具有会员ID号的数据,但是我无法添加

package com.example.app.test_network;

import java.util.List;
import com.example.app.test_network.af_model.Contact;
import io.reactivex.Single;
import retrofit2.http.GET;
import retrofit2.http.Query;


public interface ApiService {


        private com.example.app.membership.helper.SQLiteHandler db;
        private com.example.app.membership.helper.SessionManager session;

        db = new com.example.app.membership.helper.SQLiteHandler(getApplicationContext());

        session = new com.example.app.membership.helper.SessionManager(getApplicationContext());


        // Fetching user details from SQLite
        HashMap<String, String> user = db.getUserDetails(); 

    @GET("members?memberID="+user.get("memberIDno"))
    Single<List<Contact>> getContacts(@Query("source") String source, @Query("search") String query);

}

这是怎么回事?

0 个答案:

没有答案