org.immutables.criteria.sql.SqlBackend Maven / Gradle / Ivy
package org.immutables.criteria.sql;
import org.immutables.criteria.backend.Backend;
import org.immutables.criteria.backend.DefaultResult;
import org.immutables.criteria.backend.StandardOperations.Delete;
import org.immutables.criteria.backend.StandardOperations.Insert;
import org.immutables.criteria.backend.StandardOperations.Select;
import org.immutables.criteria.backend.StandardOperations.Update;
import org.immutables.criteria.backend.StandardOperations.UpdateByQuery;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;
public final class SqlBackend implements Backend {
@Override
public Session open(Class> entityType) {
return new Session(entityType);
}
private static class Session implements Backend.Session {
private final Class> type;
Session(Class> type) {
this.type = type;
}
@Override
public Class> entityType() {
return type;
}
@Override
public Result execute(Operation operation) {
Publisher> publisher = new Publisher