findByAsStream abstract method

  1. @Query.new('''SELECT * FROM Product WHERE (0 = :catagoryId or catagory_id = :catagoryId) and (0 = :typeId or type_id = :typeId) and (0 = :measureUnitId or measure_unit_id = :measureUnitId) and status = 1''')
Stream<List<ProductModel>> findByAsStream(
  1. int catagoryId,
  2. int typeId,
  3. int measureUnitId
)

Implementation

@Query('''SELECT * FROM Product WHERE
     (0 = :catagoryId or catagory_id = :catagoryId) and
     (0 = :typeId or type_id = :typeId) and
     (0 = :measureUnitId or measure_unit_id = :measureUnitId) and
     status = 1''')
Stream<List<ProductModel>> findByAsStream(
    int catagoryId, int typeId, int measureUnitId);