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

io.zero88.jooqx.LegacyJooqxTx Maven / Gradle / Ivy

The newest version!
package io.zero88.jooqx;

import java.util.function.Function;

import org.jooq.DSLContext;
import org.jooq.Query;

import io.vertx.codegen.annotations.GenIgnore;
import io.vertx.codegen.annotations.Nullable;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.core.json.JsonArray;
import io.vertx.ext.sql.ResultSet;
import io.vertx.ext.sql.SQLConnection;
import io.zero88.jooqx.LegacySQLImpl.LegacyInternal;
import io.zero88.jooqx.adapter.SQLResultAdapter;
import io.zero88.jooqx.datatype.DataTypeMapperRegistry;

import lombok.NonNull;

/**
 * Represents for a legacy SQL transaction executor
 *
 * @since 1.0.0
 */
@VertxGen
public interface LegacyJooqxTx extends LegacyInternal,
                                       SQLTxExecutor {

    @Override
    @NonNull Vertx vertx();

    @Override
    @GenIgnore(GenIgnore.PERMITTED_TYPE)
    @NonNull DSLContext dsl();

    @Override
    @NonNull SQLConnection sqlClient();

    @Override
    @GenIgnore(GenIgnore.PERMITTED_TYPE)
    @NonNull LegacySQLPreparedQuery preparedQuery();

    @Override
    @NonNull LegacySQLCollector resultCollector();

    @Override
    @GenIgnore(GenIgnore.PERMITTED_TYPE)
    @NonNull SQLErrorConverter errorConverter();

    @Override
    @GenIgnore(GenIgnore.PERMITTED_TYPE)
    @NonNull DataTypeMapperRegistry typeMapperRegistry();

    @Override
    @SuppressWarnings("unchecked")
    default @NonNull LegacyJooqxTx transaction() {
        return this;
    }

    @Override
    @GenIgnore(GenIgnore.PERMITTED_TYPE)
     Future<@Nullable R> execute(@NonNull Query query, @NonNull SQLResultAdapter adapter);

    @Override
    @GenIgnore(GenIgnore.PERMITTED_TYPE)
    default  void execute(@NonNull Query query, @NonNull SQLResultAdapter resultAdapter,
                                @NonNull Handler> handler) {
        LegacyInternal.super.execute(query, resultAdapter, handler);
    }

    @Override
    @GenIgnore(GenIgnore.PERMITTED_TYPE)
    default void batch(@NonNull Query query, @NonNull BindBatchValues bindBatchValues,
                       @NonNull Handler> handler) {
        LegacyInternal.super.batch(query, bindBatchValues, handler);
    }

    @Override
    @GenIgnore(GenIgnore.PERMITTED_TYPE)
    Future batch(@NonNull Query query, @NonNull BindBatchValues bindBatchValues);

    @Override
    default  void run(@NonNull Function> function,
                         @NonNull Handler> handler) {
        SQLTxExecutor.super.run(function, handler);
    }

    @Override
     Future run(@NonNull Function> function);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy