From 6e8d23b663fb789f34722a874dafed3daa1ec1e0 Mon Sep 17 00:00:00 2001 From: Alex Shubert Date: Wed, 14 Jun 2023 03:39:31 -0400 Subject: [PATCH] add afterStatementPrepared method to StatementInterceptor (#1622) * add after query prepared interceptor * add apiDump results --------- Co-authored-by: Aleksandr Shubert --- exposed-core/api/exposed-core.api | 4 ++++ .../org/jetbrains/exposed/sql/statements/Statement.kt | 1 + .../exposed/sql/statements/StatementInterceptor.kt | 10 ++++++++++ exposed-dao/api/exposed-dao.api | 1 + 4 files changed, 16 insertions(+) diff --git a/exposed-core/api/exposed-core.api b/exposed-core/api/exposed-core.api index 518d5b4e2a..d782864819 100644 --- a/exposed-core/api/exposed-core.api +++ b/exposed-core/api/exposed-core.api @@ -454,6 +454,7 @@ public final class org/jetbrains/exposed/sql/CompositeSqlLogger : org/jetbrains/ public fun afterExecution (Lorg/jetbrains/exposed/sql/Transaction;Ljava/util/List;Lorg/jetbrains/exposed/sql/statements/api/PreparedStatementApi;)V public fun afterRollback ()V public fun afterRollback (Lorg/jetbrains/exposed/sql/Transaction;)V + public fun afterStatementPrepared (Lorg/jetbrains/exposed/sql/Transaction;Lorg/jetbrains/exposed/sql/statements/api/PreparedStatementApi;)V public fun beforeCommit (Lorg/jetbrains/exposed/sql/Transaction;)V public fun beforeExecution (Lorg/jetbrains/exposed/sql/Transaction;Lorg/jetbrains/exposed/sql/statements/StatementContext;)V public fun beforeRollback (Lorg/jetbrains/exposed/sql/Transaction;)V @@ -2494,6 +2495,7 @@ public final class org/jetbrains/exposed/sql/statements/GlobalStatementIntercept public static fun afterExecution (Lorg/jetbrains/exposed/sql/statements/GlobalStatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;Ljava/util/List;Lorg/jetbrains/exposed/sql/statements/api/PreparedStatementApi;)V public static fun afterRollback (Lorg/jetbrains/exposed/sql/statements/GlobalStatementInterceptor;)V public static fun afterRollback (Lorg/jetbrains/exposed/sql/statements/GlobalStatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;)V + public static fun afterStatementPrepared (Lorg/jetbrains/exposed/sql/statements/GlobalStatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;Lorg/jetbrains/exposed/sql/statements/api/PreparedStatementApi;)V public static fun beforeCommit (Lorg/jetbrains/exposed/sql/statements/GlobalStatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;)V public static fun beforeExecution (Lorg/jetbrains/exposed/sql/statements/GlobalStatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;Lorg/jetbrains/exposed/sql/statements/StatementContext;)V public static fun beforeRollback (Lorg/jetbrains/exposed/sql/statements/GlobalStatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;)V @@ -2586,6 +2588,7 @@ public abstract interface class org/jetbrains/exposed/sql/statements/StatementIn public abstract fun afterExecution (Lorg/jetbrains/exposed/sql/Transaction;Ljava/util/List;Lorg/jetbrains/exposed/sql/statements/api/PreparedStatementApi;)V public abstract fun afterRollback ()V public abstract fun afterRollback (Lorg/jetbrains/exposed/sql/Transaction;)V + public abstract fun afterStatementPrepared (Lorg/jetbrains/exposed/sql/Transaction;Lorg/jetbrains/exposed/sql/statements/api/PreparedStatementApi;)V public abstract fun beforeCommit (Lorg/jetbrains/exposed/sql/Transaction;)V public abstract fun beforeExecution (Lorg/jetbrains/exposed/sql/Transaction;Lorg/jetbrains/exposed/sql/statements/StatementContext;)V public abstract fun beforeRollback (Lorg/jetbrains/exposed/sql/Transaction;)V @@ -2598,6 +2601,7 @@ public final class org/jetbrains/exposed/sql/statements/StatementInterceptor$Def public static fun afterExecution (Lorg/jetbrains/exposed/sql/statements/StatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;Ljava/util/List;Lorg/jetbrains/exposed/sql/statements/api/PreparedStatementApi;)V public static fun afterRollback (Lorg/jetbrains/exposed/sql/statements/StatementInterceptor;)V public static fun afterRollback (Lorg/jetbrains/exposed/sql/statements/StatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;)V + public static fun afterStatementPrepared (Lorg/jetbrains/exposed/sql/statements/StatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;Lorg/jetbrains/exposed/sql/statements/api/PreparedStatementApi;)V public static fun beforeCommit (Lorg/jetbrains/exposed/sql/statements/StatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;)V public static fun beforeExecution (Lorg/jetbrains/exposed/sql/statements/StatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;Lorg/jetbrains/exposed/sql/statements/StatementContext;)V public static fun beforeRollback (Lorg/jetbrains/exposed/sql/statements/StatementInterceptor;Lorg/jetbrains/exposed/sql/Transaction;)V diff --git a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/statements/Statement.kt b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/statements/Statement.kt index 1fd53adf71..8be75ebce7 100644 --- a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/statements/Statement.kt +++ b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/statements/Statement.kt @@ -58,6 +58,7 @@ abstract class Statement(val type: StatementType, val targets: List, executedStatement: PreparedStatementApi) {} fun beforeCommit(transaction: Transaction) {} diff --git a/exposed-dao/api/exposed-dao.api b/exposed-dao/api/exposed-dao.api index 4625e91084..9adc36989b 100644 --- a/exposed-dao/api/exposed-dao.api +++ b/exposed-dao/api/exposed-dao.api @@ -190,6 +190,7 @@ public final class org/jetbrains/exposed/dao/EntityLifecycleInterceptor : org/je public fun afterExecution (Lorg/jetbrains/exposed/sql/Transaction;Ljava/util/List;Lorg/jetbrains/exposed/sql/statements/api/PreparedStatementApi;)V public fun afterRollback ()V public fun afterRollback (Lorg/jetbrains/exposed/sql/Transaction;)V + public fun afterStatementPrepared (Lorg/jetbrains/exposed/sql/Transaction;Lorg/jetbrains/exposed/sql/statements/api/PreparedStatementApi;)V public fun beforeCommit (Lorg/jetbrains/exposed/sql/Transaction;)V public fun beforeExecution (Lorg/jetbrains/exposed/sql/Transaction;Lorg/jetbrains/exposed/sql/statements/StatementContext;)V public fun beforeRollback (Lorg/jetbrains/exposed/sql/Transaction;)V