Package org.komamitsu.spring.data.sqlite
Interface SqliteRepository<T,ID>
-
- Type Parameters:
T- a model classID- an identifier class
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<T,ID>,org.springframework.data.repository.PagingAndSortingRepository<T,ID>,org.springframework.data.repository.Repository<T,ID>
- All Known Implementing Classes:
SqliteRepositoryImpl
@NoRepositoryBean public interface SqliteRepository<T,ID> extends org.springframework.data.repository.PagingAndSortingRepository<T,ID>A Spring Data fragment repository interface for SQLite. This interface has a feature that's not SQLite specific but useful in some cases.CrudRepository.save(Object)depends on auto-increment id columns andCrudRepositorydoesn't expose `insert()` and `update()` methods. So, users always need to use SQLite's autoincrement feature on tables. For non-autoincrement ID tables, indeed there are some workarounds https://spring.io/blog/2021/09/09/spring-data-jdbc-how-to-use-custom-id-generation, but they are not straightforward. This class provides `insert()` and `update()` instead ofCrudRepository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tinsert(T instance)Tupdate(T instance)
-