All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.scalar.db.sql.springdata.ScalarDbRepository Maven / Gradle / Ivy

package com.scalar.db.sql.springdata;

import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.PagingAndSortingRepository;

/**
 * Spring Data fragment repository interface for ScalarDB. {@link CrudRepository#save(Object)}
 * depends on auto-incremented id columns and ScalarDB doesn't support the feature and {@link
 * CrudRepository} doesn't expose `insert()` and `update()` methods. This class provides `insert()`
 * and `update()` instead of {@link CrudRepository}.
 *
 * @param  a model class
 */
@NoRepositoryBean
public interface ScalarDbRepository
    extends CrudRepository, PagingAndSortingRepository {
  T insert(T instance);

  T update(T instance);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy