package it.integry.integrywmsnative.core.data_store.db.dao;

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

import java.util.List;

import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;

@Dao
public interface MtbColrDao {
    @Query("SELECT * from mtb_colr ")
    List<SqlMtbColr> getAll();

    @Insert
    Long insert(SqlMtbColr mtbColr);

    @Update
    void update(SqlMtbColr mtbColr);

    @Delete
    void delete(SqlMtbColr mtbColr);

    @Query("SELECT * FROM mtb_colr WHERE id_collo = :idDocument ORDER BY id DESC")
    List<SqlMtbColr> getDocumentRows(long idDocument);
}
