2017-10-19 02:46:09 +00:00
|
|
|
package cy.agorise.crystalwallet.dao;
|
|
|
|
|
2018-11-29 18:20:25 +00:00
|
|
|
import androidx.lifecycle.LiveData;
|
|
|
|
import androidx.room.Dao;
|
|
|
|
import androidx.room.Insert;
|
|
|
|
import androidx.room.OnConflictStrategy;
|
|
|
|
import androidx.room.Query;
|
2017-10-19 02:46:09 +00:00
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import cy.agorise.crystalwallet.models.BitsharesAssetInfo;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by henry on 18/10/2017.
|
|
|
|
*/
|
|
|
|
@Dao
|
|
|
|
public interface BitsharesAssetDao {
|
|
|
|
|
|
|
|
@Query("SELECT * FROM bitshares_asset")
|
|
|
|
LiveData<List<BitsharesAssetInfo>> getAll();
|
|
|
|
|
|
|
|
@Query("SELECT * FROM bitshares_asset WHERE crypto_curreny_id = :cryptoCurrencyId")
|
2017-11-16 01:47:11 +00:00
|
|
|
BitsharesAssetInfo getBitsharesAssetInfo(long cryptoCurrencyId);
|
2017-10-19 02:46:09 +00:00
|
|
|
|
2017-11-09 02:42:22 +00:00
|
|
|
@Query("SELECT * FROM bitshares_asset WHERE crypto_curreny_id = :cryptoCurrencyId")
|
|
|
|
BitsharesAssetInfo getBitsharesAssetInfoFromCurrencyId(long cryptoCurrencyId);
|
|
|
|
|
2017-10-19 02:46:09 +00:00
|
|
|
@Query("SELECT * FROM bitshares_asset WHERE bitshares_id = :bitsharesId")
|
2017-10-25 02:58:45 +00:00
|
|
|
BitsharesAssetInfo getBitsharesAssetInfoById(String bitsharesId);
|
2017-10-19 02:46:09 +00:00
|
|
|
|
2018-09-21 04:43:29 +00:00
|
|
|
@Insert(onConflict = OnConflictStrategy.IGNORE)
|
2017-10-19 02:46:09 +00:00
|
|
|
public long[] insertBitsharesAssetInfo(BitsharesAssetInfo... accounts);
|
|
|
|
}
|