-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from zero88/feature/support-session
[#137] Implement JooqxSession
- Loading branch information
Showing
43 changed files
with
1,103 additions
and
1,129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
core/src/main/java/io/github/zero88/jooqx/JooqxSession.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package io.github.zero88.jooqx; | ||
|
||
import java.util.function.Function; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import io.vertx.codegen.annotations.VertxGen; | ||
import io.vertx.core.AsyncResult; | ||
import io.vertx.core.Future; | ||
import io.vertx.core.Handler; | ||
import io.vertx.sqlclient.SqlConnection; | ||
import io.vertx.sqlclient.Tuple; | ||
|
||
/** | ||
* @since 2.0.0 | ||
*/ | ||
@VertxGen | ||
public interface JooqxSession extends JooqxConn, | ||
SQLSessionExecutor<SqlConnection, Tuple, JooqxPreparedQuery, | ||
JooqxResultCollector, JooqxSession> { | ||
|
||
@Override | ||
default @NotNull JooqxSession session() { return this; } | ||
|
||
default <R> void perform(@NotNull Function<JooqxSession, Future<R>> sessionFn, | ||
@NotNull Handler<AsyncResult<R>> handler) { | ||
perform(sessionFn).onComplete(handler); | ||
} | ||
|
||
@Override | ||
<R> Future<R> perform(@NotNull Function<JooqxSession, Future<R>> sessionFn); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
core/src/main/java/io/github/zero88/jooqx/LegacyJooqxSession.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package io.github.zero88.jooqx; | ||
|
||
import java.util.function.Function; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
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.json.JsonArray; | ||
import io.vertx.ext.sql.SQLConnection; | ||
|
||
/** | ||
* @since 2.0.0 | ||
*/ | ||
@VertxGen | ||
@Deprecated | ||
public interface LegacyJooqxSession extends LegacyInternal<SQLConnection>, | ||
SQLSessionExecutor<SQLConnection, JsonArray, LegacySQLPreparedQuery, | ||
LegacySQLCollector, LegacyJooqxSession> { | ||
|
||
@Override | ||
default @NotNull LegacyJooqxSession session() { return this; } | ||
|
||
@Override | ||
@NotNull LegacyJooqxTx transaction(); | ||
|
||
@Override | ||
default <R> void perform(@NotNull Function<LegacyJooqxSession, Future<R>> sessionFn, | ||
@NotNull Handler<AsyncResult<R>> handler) { | ||
perform(sessionFn).onComplete(handler); | ||
} | ||
|
||
@Override | ||
<R> Future<R> perform(@NotNull Function<LegacyJooqxSession, Future<R>> sessionFn); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.