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

com.firefly.reactive.adapter.db.ReactiveSQLClient Maven / Gradle / Ivy

There is a newer version: 5.0.0-dev6
Show newest version
package com.firefly.reactive.adapter.db;

import com.firefly.db.SQLClient;
import com.firefly.utils.function.Func1;
import reactor.core.publisher.Mono;

/**
 * SQLClient reactor adapter
 *
 * @author Pengtao Qiu
 */
public interface ReactiveSQLClient {

    /**
     * Get a database connection.
     *
     * @return A database connection that is wrapped by Mono.
     */
    Mono getConnection();

    /**
     * Execute a transaction.
     *
     * @param func1 To execute the transaction function.
     * @param    The type of transaction result.
     * @return The transaction result that is wrapped by Mono.
     */
     Mono newTransaction(Func1> func1);

    /**
     * Get original SQL client.
     *
     * @return The original SQL client.
     */
    SQLClient getSQLClient();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy