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

io.tarantool.driver.api.space.options.OperationWithFieldsOptions Maven / Gradle / Ivy

Go to download

Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework

There is a newer version: 0.14.0
Show newest version
package io.tarantool.driver.api.space.options;

import java.util.List;
import java.util.Optional;

/**
 * Base interface for all operation options that may have a configurable return.
 *
 * @author Artyom Dubinin
 */
public interface OperationWithFieldsOptions>
    extends Options, Self {

    String FIELDS = "fields";

    /**
     * Specifies list of fields names for getting only a subset of fields.
     * By default, all fields are returned.
     *
     * @param fields list of string field names
     * @return this options instance
     */
    default T withFields(List fields) {
        addOption(FIELDS, fields);
        return self();
    }

    /**
     * Return list of fields names for getting only a subset of fields.
     *
     * @return list of fields string names
     */
    default Optional getFields() {
        return getOption(FIELDS, List.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy