package com.lc.myapplication.security.locks.lockroom;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;


@Dao
public interface SecurityLockDAO {
    @Query("select * from lock_table where apppakname=:apppakname")
    SecurityLockEntity QueryPackname(String apppakname);

    @Query("SELECT * FROM lock_table WHERE apppakname LIKE '%' || :apppakname || '%' ")
    List<SecurityLockEntity> QueryByInputName(String apppakname);
    @Query("delete from lock_table where apppakname=:apppakname")
    void DeleteEntityByName(String apppakname);
    @Insert(onConflict = OnConflictStrategy.IGNORE)
    void InsertSecurityEntity(SecurityLockEntity securityLockEntity);
    @Query("select * from lock_table")
    List<SecurityLockEntity> GetAllapp();
    @Query("select * from lock_table where locksuccess=:locksuccess")
    List<SecurityLockEntity> GetLockedApp(boolean locksuccess);
    @Update
    void Updataentity(SecurityLockEntity entity);

}
