// Path: src/main/java/ru/shadam/tarantool/core/update/Operation.java
// public abstract class Operation<TOperator extends Operator> {
//     protected final TOperator operator;
//     protected final int fieldNumber;
// 
//     public Operation(TOperator operator, int fieldNumber) {
//         this.operator = operator;
//         this.fieldNumber = fieldNumber;
//     }
// 
//     public abstract List toTuple();
// 
// }


import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import ru.shadam.tarantool.core.update.Operation;
import java.util.Collections;
import java.util.List;
     * @param iterator {@link Iterator} to use
     * @return List of intities
     */
    List<V> select(String space, String index, K key, Pageable pageable, Iterator iterator);

    /**
     * Insert entity into space
     * @param space name of space to replace to
     * @param value value to replace
     * @return inserted value
     */
    V insert(String space, K key, V value);

    /**
     * Insert entity into space if key doesn't exists or replace by
     * @param space
     * @param key
     * @param value
     * @return
     */
    V replace(String space, K key, V value);

    /**
     * Apply single operation to entity selected by key
     * @param space name of space to select entities from
     * @param index name of index to use
     * @param key key to use
     * @param operation {@link Operation} to apply
     * @return result of operation
     */
// Path: src/main/java/ru/shadam/tarantool/core/update/Operation.java
// public abstract class Operation<TOperator extends Operator> {
//     protected final TOperator operator;
//     protected final int fieldNumber;
// 
//     public Operation(TOperator operator, int fieldNumber) {
//         this.operator = operator;
//         this.fieldNumber = fieldNumber;
//     }
// 
//     public abstract List toTuple();
// 
// }


// Path: src/main/java/ru/shadam/tarantool/core/TarantoolOperations.java
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import ru.shadam.tarantool.core.update.Operation;
import java.util.Collections;
import java.util.List;

     * @param iterator {@link Iterator} to use
     * @return List of intities
     */
    List<V> select(String space, String index, K key, Pageable pageable, Iterator iterator);

    /**
     * Insert entity into space
     * @param space name of space to replace to
     * @param value value to replace
     * @return inserted value
     */
    V insert(String space, K key, V value);

    /**
     * Insert entity into space if key doesn't exists or replace by
     * @param space
     * @param key
     * @param value
     * @return
     */
    V replace(String space, K key, V value);

    /**
     * Apply single operation to entity selected by key
     * @param space name of space to select entities from
     * @param index name of index to use
     * @param key key to use
     * @param operation {@link Operation} to apply
     * @return result of operation
     */
    default V update(String space, String index, K key, Operation operation) {