From d9eb743952e98b3287c6656b7e27abbe4cd518ac Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Thu, 7 Nov 2024 22:35:10 +0800 Subject: [PATCH 1/6] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..da80987 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +shreckye@gmail.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From 3ac08d8da201dbead883cfe95285f95841a5b1bb Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Fri, 8 Nov 2024 00:12:28 +0800 Subject: [PATCH 2/6] Create CONTRIBUTING.md A source commit: https://github.com/huanshankeji/gradle-common/commit/c0118b9ef0c90c75d6426bacde3b2069bc0668a6 --- CONTRIBUTING.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ca714df --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,23 @@ +# Contributing guidelines + +Hello, thank you for your interest in contributing to our project. + +## Issues and Discussions + +You are welcome to submit issues on bugs or feature requests. If you have questions, please ask them in GitHub Discussions. + +## Pull requests + +If you want to contribute to the code of our project, you are welcome to open pull requests. However, it's always a good idea to open a related issue or talk with us in Discussions first. + +## Development + +Please make sure you have a valid JDK installed. Some projects may require multiple JDKs of different versions. The JDK version we use can be found in the [GitHub Actions workflow files](.github/workflows). + +We recommend developing with IntelliJ IDEA. In IntelliJ IDEA, select the correct [Project SDK in Project Structure](https://www.jetbrains.com/help/idea/project-settings-and-structure.html#project-sdk) and it's recommended to set [Gradle JVM](https://www.jetbrains.com/help/idea/gradle-jvm-selection.html#jvm_settings) to "Project SDK". + +Run the `publishToMavenLocal` Gradle task to publish the libraries to your machine's Maven Local Repository so your projects can depend on the changes you have made, run `check` to ensure our limited number of tests pass. + +## Furthur notice + +We are currently a small team with limited effort. While we may not always implement your requested features, merge your pull requests, or do such things in time, you are always welcome to create your own fork and make any changes you like. From c3f1c89fb4eb77ea76f4f9f18363a95c384368d2 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Fri, 8 Nov 2024 10:55:41 +0800 Subject: [PATCH 3/6] Apply the binary compatibility validator Gradle plugin --- build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle.kts b/build.gradle.kts index 7b5b7b8..35587e3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,6 +4,7 @@ tasks.wrapper { plugins { id("org.jetbrains.dokka") + id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3" } dependencies { From ed81cd825c5510c96f75394731006f1619a96d51 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Fri, 8 Nov 2024 10:56:39 +0800 Subject: [PATCH 4/6] Run `apiDump` --- .../exposed-vertx-sql-client-postgresql.api | 227 ++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 lib/api/exposed-vertx-sql-client-postgresql.api diff --git a/lib/api/exposed-vertx-sql-client-postgresql.api b/lib/api/exposed-vertx-sql-client-postgresql.api new file mode 100644 index 0000000..e1da900 --- /dev/null +++ b/lib/api/exposed-vertx-sql-client-postgresql.api @@ -0,0 +1,227 @@ +public abstract interface class com/huanshankeji/exposedvertxsqlclient/ConnectionConfig { + public abstract fun getDatabase ()Ljava/lang/String; + public abstract fun getUserAndRole ()Ljava/lang/String; +} + +public final class com/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket : com/huanshankeji/exposedvertxsqlclient/ConnectionConfig { + public fun (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getDatabase ()Ljava/lang/String; + public final fun getHost ()Ljava/lang/String; + public final fun getPassword ()Ljava/lang/String; + public final fun getPort ()Ljava/lang/Integer; + public final fun getUser ()Ljava/lang/String; + public fun getUserAndRole ()Ljava/lang/String; +} + +public final class com/huanshankeji/exposedvertxsqlclient/ConnectionConfig$UnixDomainSocketWithPeerAuthentication : com/huanshankeji/exposedvertxsqlclient/ConnectionConfig { + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + public fun getDatabase ()Ljava/lang/String; + public final fun getPath ()Ljava/lang/String; + public final fun getRole ()Ljava/lang/String; + public fun getUserAndRole ()Ljava/lang/String; +} + +public final class com/huanshankeji/exposedvertxsqlclient/ConnectionType : java/lang/Enum { + public static final field Socket Lcom/huanshankeji/exposedvertxsqlclient/ConnectionType; + public static final field UnixDomainSocketWithPeerAuthentication Lcom/huanshankeji/exposedvertxsqlclient/ConnectionType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lcom/huanshankeji/exposedvertxsqlclient/ConnectionType; + public static fun values ()[Lcom/huanshankeji/exposedvertxsqlclient/ConnectionType; +} + +public final class com/huanshankeji/exposedvertxsqlclient/DatabaseClient { + public fun (Lio/vertx/sqlclient/SqlClient;Lorg/jetbrains/exposed/sql/Database;ZZ)V + public synthetic fun (Lio/vertx/sqlclient/SqlClient;Lorg/jetbrains/exposed/sql/Database;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun close (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun createTable (Lorg/jetbrains/exposed/sql/Table;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun doExecute (Lorg/jetbrains/exposed/sql/statements/Statement;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun dropTable (Lorg/jetbrains/exposed/sql/Table;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun execute (Lorg/jetbrains/exposed/sql/statements/Statement;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeBatch (Ljava/lang/Iterable;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeBatchForVertxSqlClientRowSetSequence (Ljava/lang/Iterable;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeBatchQuery (Lorg/jetbrains/exposed/sql/FieldSet;Ljava/lang/Iterable;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeBatchQuery (Lorg/jetbrains/exposed/sql/FieldSet;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeBatchUpdate (Ljava/lang/Iterable;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeExpression (Lkotlin/reflect/KClass;Lorg/jetbrains/exposed/sql/Expression;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeForVertxSqlClientRowSet (Lorg/jetbrains/exposed/sql/statements/Statement;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executePlainSql (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executePlainSqlUpdate (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeQuery (Lorg/jetbrains/exposed/sql/Query;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeQuery (Lorg/jetbrains/exposed/sql/Query;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeSingleOrNoUpdate (Lorg/jetbrains/exposed/sql/statements/Statement;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeSingleUpdate (Lorg/jetbrains/exposed/sql/statements/Statement;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeUpdate (Lorg/jetbrains/exposed/sql/statements/Statement;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeWithMapping (Lorg/jetbrains/exposed/sql/statements/Statement;Ljava/util/function/Function;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun exposedTransaction (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public final fun getExposedDatabase ()Lorg/jetbrains/exposed/sql/Database; + public final fun getFieldExpressionSetWithTransaction (Lorg/jetbrains/exposed/sql/FieldSet;)Ljava/util/Set; + public final fun getFieldExpressionSetWithTransaction (Lorg/jetbrains/exposed/sql/Query;)Ljava/util/Set; + public final fun getLogSql ()Z + public final fun getValidateBatch ()Z + public final fun getVertxSqlClient ()Lio/vertx/sqlclient/SqlClient; + public final fun isWorking (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun toExposedResultRowWithTransaction (Lio/vertx/sqlclient/Row;Lorg/jetbrains/exposed/sql/Query;)Lorg/jetbrains/exposed/sql/ResultRow; +} + +public final class com/huanshankeji/exposedvertxsqlclient/DatabaseClientKt { + public static final fun createBetterPgPoolDatabaseClient (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/LocalConnectionConfig;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lorg/jetbrains/exposed/sql/Database;)Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient; + public static synthetic fun createBetterPgPoolDatabaseClient$default (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/LocalConnectionConfig;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lorg/jetbrains/exposed/sql/Database;ILjava/lang/Object;)Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient; + public static final fun createPgPoolDatabaseClient (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket;)Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient; + public static final fun createPgPoolDatabaseClient (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lorg/jetbrains/exposed/sql/Database;)Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient; + public static final fun createPgPoolDatabaseClient (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionType;Lcom/huanshankeji/exposedvertxsqlclient/LocalConnectionConfig;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lorg/jetbrains/exposed/sql/Database;)Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient; + public static synthetic fun createPgPoolDatabaseClient$default (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket;ILjava/lang/Object;)Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient; + public static synthetic fun createPgPoolDatabaseClient$default (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lorg/jetbrains/exposed/sql/Database;ILjava/lang/Object;)Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient; + public static synthetic fun createPgPoolDatabaseClient$default (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionType;Lcom/huanshankeji/exposedvertxsqlclient/LocalConnectionConfig;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lorg/jetbrains/exposed/sql/Database;ILjava/lang/Object;)Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient; + public static final fun getFieldExpressionSet (Lorg/jetbrains/exposed/sql/FieldSet;)Ljava/util/Set; + public static final fun getFieldExpressionSet (Lorg/jetbrains/exposed/sql/Query;)Ljava/util/Set; + public static final fun getSavepointNameRegex ()Lkotlin/text/Regex; + public static final fun getVertxPgClientPreparedSql (Lorg/jetbrains/exposed/sql/statements/Statement;Lorg/jetbrains/exposed/sql/Transaction;)Ljava/lang/String; + public static final fun getVertxSqlClientArgTuple (Lorg/jetbrains/exposed/sql/statements/Statement;)Lio/vertx/sqlclient/Tuple; + public static final fun singleOrNoResult (Lio/vertx/sqlclient/RowSet;)Ljava/lang/Object; + public static final fun singleOrNoUpdate (I)Z + public static final fun singleResult (Lio/vertx/sqlclient/RowSet;)Ljava/lang/Object; + public static final fun singleStatementArguments (Lorg/jetbrains/exposed/sql/statements/Statement;)Ljava/lang/Iterable; + public static final fun toExposedResultRow (Lio/vertx/sqlclient/Row;Ljava/util/Set;)Lorg/jetbrains/exposed/sql/ResultRow; + public static final fun toExposedResultRow (Lio/vertx/sqlclient/Row;Lorg/jetbrains/exposed/sql/Query;)Lorg/jetbrains/exposed/sql/ResultRow; + public static final fun toVertxPgClientPreparedSql (Ljava/lang/String;)Ljava/lang/String; + public static final fun toVertxTuple (Ljava/lang/Iterable;)Lio/vertx/sqlclient/Tuple; + public static final fun types (Ljava/lang/Iterable;)Ljava/util/List; + public static final fun withPgTransaction (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun withSavepointAndRollbackIfThrows (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun withSavepointAndRollbackIfThrowsOrFalse (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun withSavepointAndRollbackIfThrowsOrLeft (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun withSavepointAndRollbackIfThrowsOrNone (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun withTransaction (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun withTransactionCommitOrRollback (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class com/huanshankeji/exposedvertxsqlclient/EvscConfig : com/huanshankeji/exposedvertxsqlclient/IEvscConfig { + public fun (Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;)V + public fun getExposedConnectionConfig ()Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket; + public fun getVertxSqlClientConnectionConfig ()Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig; +} + +public abstract interface annotation class com/huanshankeji/exposedvertxsqlclient/ExperimentalEvscApi : java/lang/annotation/Annotation { +} + +public final class com/huanshankeji/exposedvertxsqlclient/ExposedDatabasesKt { + public static final fun exposedDatabaseConnectPostgreSql (Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket;)Lorg/jetbrains/exposed/sql/Database; +} + +public abstract interface class com/huanshankeji/exposedvertxsqlclient/IEvscConfig { + public abstract fun getExposedConnectionConfig ()Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket; + public abstract fun getVertxSqlClientConnectionConfig ()Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig; +} + +public final class com/huanshankeji/exposedvertxsqlclient/LocalConnectionConfig { + public static final field Companion Lcom/huanshankeji/exposedvertxsqlclient/LocalConnectionConfig$Companion; + public static final field SOCKET_HOST Ljava/lang/String; + public static final field UNIX_DOMAIN_SOCKET_PATH Ljava/lang/String; + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + public final fun getDatabase ()Ljava/lang/String; + public final fun getSocketConnectionConfig ()Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket; + public final fun getSocketConnectionPassword ()Ljava/lang/String; + public final fun getUnixDomainSocketWithPeerAuthenticationConnectionConfig ()Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$UnixDomainSocketWithPeerAuthentication; + public final fun getUser ()Ljava/lang/String; +} + +public final class com/huanshankeji/exposedvertxsqlclient/LocalConnectionConfig$Companion { +} + +public final class com/huanshankeji/exposedvertxsqlclient/LocalConnectionConfigKt { + public static final fun toPerformantUnixEvscConfig (Lcom/huanshankeji/exposedvertxsqlclient/LocalConnectionConfig;)Lcom/huanshankeji/exposedvertxsqlclient/EvscConfig; + public static final fun toUniversalEvscConfig (Lcom/huanshankeji/exposedvertxsqlclient/LocalConnectionConfig;)Lcom/huanshankeji/exposedvertxsqlclient/EvscConfig; +} + +public final class com/huanshankeji/exposedvertxsqlclient/SingleUpdateException : java/lang/Exception { + public fun (I)V +} + +public final class com/huanshankeji/exposedvertxsqlclient/VertxSqlClientsKt { + public static final fun createPeerAuthenticationUnixDomainSocketGenericPgClient (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lkotlin/jvm/functions/Function3;)Ljava/lang/Object; + public static synthetic fun createPeerAuthenticationUnixDomainSocketGenericPgClient$default (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun createPeerAuthenticationUnixDomainSocketPgConnectionAndSetRole (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun createPeerAuthenticationUnixDomainSocketPgConnectionAndSetRole$default (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun createPeerAuthenticationUnixDomainSocketPgPool (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;)Lio/vertx/pgclient/PgPool; + public static synthetic fun createPeerAuthenticationUnixDomainSocketPgPool$default (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;ILjava/lang/Object;)Lio/vertx/pgclient/PgPool; + public static final fun createPeerAuthenticationUnixDomainSocketPgPoolAndSetRole (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;)Lio/vertx/pgclient/PgPool; + public static synthetic fun createPeerAuthenticationUnixDomainSocketPgPoolAndSetRole$default (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;ILjava/lang/Object;)Lio/vertx/pgclient/PgPool; + public static final fun createPeerAuthenticationUnixDomainSocketPgSqlClient (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;)Lio/vertx/sqlclient/SqlClient; + public static synthetic fun createPeerAuthenticationUnixDomainSocketPgSqlClient$default (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;ILjava/lang/Object;)Lio/vertx/sqlclient/SqlClient; + public static final fun createPgConnectOptions (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lio/vertx/pgclient/PgConnectOptions; + public static synthetic fun createPgConnectOptions$default (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lio/vertx/pgclient/PgConnectOptions; + public static final fun createSocketGenericPgClient (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lkotlin/jvm/functions/Function3;)Ljava/lang/Object; + public static synthetic fun createSocketGenericPgClient$default (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun createSocketPgConnection (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun createSocketPgConnection$default (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun createSocketPgPool (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;)Lio/vertx/pgclient/PgPool; + public static synthetic fun createSocketPgPool$default (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;ILjava/lang/Object;)Lio/vertx/pgclient/PgPool; + public static final fun createSocketPgSqlClient (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;)Lio/vertx/sqlclient/SqlClient; + public static synthetic fun createSocketPgSqlClient$default (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;ILjava/lang/Object;)Lio/vertx/sqlclient/SqlClient; + public static final fun createUnixDomainSocketPgSqlClientAndSetRole (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun createUnixDomainSocketPgSqlClientAndSetRole$default (Lio/vertx/core/Vertx;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lio/vertx/sqlclient/PoolOptions;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun executeSetRole (Lio/vertx/sqlclient/SqlConnection;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class com/huanshankeji/exposedvertxsqlclient/classpropertymapping/ReflectionBasedClassPropertyIndexVertxSqlClientRowDataQueryMapper : com/huanshankeji/vertx/sqlclient/datamapping/RowDataQueryMapper { + public fun (Lkotlin/reflect/KClass;Lkotlin/Unit;)V + public final fun getClassPropertyColumnIndexMappings ()Lkotlin/Unit; + public final fun getClazz ()Lkotlin/reflect/KClass; + public fun rowToData (Lio/vertx/sqlclient/Row;)Ljava/lang/Object; +} + +public final class com/huanshankeji/exposedvertxsqlclient/sql/DatabaseClientSqlKt { + public static final fun batchInsert (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun batchInsertIgnore (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun batchInsertSelect (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Ljava/lang/Iterable;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun batchSingleOrNoUpdate (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun batchSingleOrNoUpdate$default (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun batchUpdate (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun batchUpdate$default (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun executeInsertIgnore (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun executeSingleColumnSelectQuery (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/ColumnSet;Lorg/jetbrains/exposed/sql/Column;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun executeSingleColumnSelectQuery (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/ColumnSet;Lorg/jetbrains/exposed/sql/Column;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun insert (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun insertIgnore (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun insertIgnoreSelect (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lorg/jetbrains/exposed/sql/AbstractQuery;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun insertIgnoreSelect$default (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lorg/jetbrains/exposed/sql/AbstractQuery;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun insertIgnoreSingle (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun insertSelect (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lorg/jetbrains/exposed/sql/AbstractQuery;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun insertSelect$default (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lorg/jetbrains/exposed/sql/AbstractQuery;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun insertSingle (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun select (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/ColumnSet;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun select (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/ColumnSet;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun selectBatch (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/FieldSet;Lkotlin/jvm/functions/Function2;Ljava/lang/Iterable;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun selectExpression (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lkotlin/reflect/KClass;Lorg/jetbrains/exposed/sql/Expression;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun selectSingleColumn (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/ColumnSet;Lorg/jetbrains/exposed/sql/Column;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun selectSingleColumn (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/ColumnSet;Lorg/jetbrains/exposed/sql/Column;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun selectSingleEntityIdColumn (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/ColumnSet;Lorg/jetbrains/exposed/sql/Column;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun selectTableExpression (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/ColumnSet;Lorg/jetbrains/exposed/sql/Expression;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sortDataAndBatchUpdate (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun sortDataAndBatchUpdate$default (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun update (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun update$default (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; +} + +public final class com/huanshankeji/exposedvertxsqlclient/sql/mapping/DatabaseClientSqlWithMapperKt { + public static final fun batchInsert (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Iterable;Lcom/huanshankeji/exposed/datamapping/DataUpdateMapper;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun batchInsertIgnore (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Iterable;Lcom/huanshankeji/exposed/datamapping/DataUpdateMapper;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun batchUpdateBuilderSetter (Lcom/huanshankeji/exposed/datamapping/DataUpdateMapper;)Lkotlin/jvm/functions/Function3; + public static final fun deleteIgnoreWhere (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Integer;Ljava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun deleteIgnoreWhere$default (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Integer;Ljava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun deleteWhere (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Integer;Ljava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun deleteWhere$default (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Integer;Ljava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun executeQuery (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Query;Lcom/huanshankeji/exposed/datamapping/DataQueryMapper;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun executeVertxSqlClientRowQuery (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Query;Lcom/huanshankeji/vertx/sqlclient/datamapping/RowDataQueryMapper;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun insert (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Object;Lcom/huanshankeji/exposed/datamapping/DataUpdateMapper;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun insertIgnore (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Ljava/lang/Object;Lcom/huanshankeji/exposed/datamapping/DataUpdateMapper;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun select (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/ColumnSet;Lcom/huanshankeji/exposed/datamapping/DataQueryMapper;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun update (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;Ljava/lang/Object;Lcom/huanshankeji/exposed/datamapping/DataUpdateMapper;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun update$default (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lorg/jetbrains/exposed/sql/Table;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;Ljava/lang/Object;Lcom/huanshankeji/exposed/datamapping/DataUpdateMapper;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; +} + +public abstract interface class com/huanshankeji/vertx/sqlclient/datamapping/RowDataQueryMapper { + public abstract fun rowToData (Lio/vertx/sqlclient/Row;)Ljava/lang/Object; +} + From 33f0abd7e0bcaf40ac114bb15d61d39e31fbcaba Mon Sep 17 00:00:00 2001 From: Yongshun Shreck Ye Date: Thu, 14 Nov 2024 17:55:26 +0800 Subject: [PATCH 5/6] Run Code Cleanup with IntelliJ IDEA and revert some erroneous or unnecessary changes --- .../benchmark/PreparedSqlGenerationBenchmark.kt | 2 +- .../exposedvertxsqlclient/DatabaseClient.kt | 4 ++-- .../exposedvertxsqlclient/VertxSqlClients.kt | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/src/benchmarks/kotlin/com/huanshankeji/exposed/benchmark/PreparedSqlGenerationBenchmark.kt b/lib/src/benchmarks/kotlin/com/huanshankeji/exposed/benchmark/PreparedSqlGenerationBenchmark.kt index 3110a50..977bec2 100644 --- a/lib/src/benchmarks/kotlin/com/huanshankeji/exposed/benchmark/PreparedSqlGenerationBenchmark.kt +++ b/lib/src/benchmarks/kotlin/com/huanshankeji/exposed/benchmark/PreparedSqlGenerationBenchmark.kt @@ -16,7 +16,7 @@ import org.jetbrains.exposed.sql.transactions.transaction class PreparedSqlGenerationBenchmark : WithContainerizedDatabaseBenchmark() { enum class StatementEnum(val statement: Statement<*>) { SelectAll(VarcharTable.selectAll()), - SelectWhere(VarcharTable.select(VarcharTable.id eq 0L)), + SelectWhere(VarcharTable.selectAll().where(VarcharTable.id eq 0L)), Insert(VarcharTable.insertStatement { it[varcharColumn] = "string" }), Update(VarcharTable.updateStatement({ VarcharTable.id eq 0L }) { it[varcharColumn] = "string" diff --git a/lib/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/DatabaseClient.kt b/lib/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/DatabaseClient.kt index f66ac8a..b82985e 100644 --- a/lib/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/DatabaseClient.kt +++ b/lib/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/DatabaseClient.kt @@ -5,7 +5,7 @@ import com.huanshankeji.collections.singleOrNullIfEmpty import com.huanshankeji.exposedvertxsqlclient.ConnectionConfig.Socket import com.huanshankeji.exposedvertxsqlclient.ConnectionConfig.UnixDomainSocketWithPeerAuthentication import com.huanshankeji.exposedvertxsqlclient.sql.selectExpression -import com.huanshankeji.os.isOSLinux +import com.huanshankeji.os.isCurrentOsLinux import com.huanshankeji.vertx.kotlin.coroutines.coroutineToFuture import com.huanshankeji.vertx.kotlin.sqlclient.executeBatchAwaitForSqlResultSequence import io.vertx.core.Vertx @@ -529,7 +529,7 @@ fun createBetterPgPoolDatabaseClient( ) = createPgPoolDatabaseClient( vertx, - if (isOSLinux()) ConnectionType.UnixDomainSocketWithPeerAuthentication else ConnectionType.Socket, + if (isCurrentOsLinux()) ConnectionType.UnixDomainSocketWithPeerAuthentication else ConnectionType.Socket, localConnectionConfig, extraPgConnectOptions, poolOptions, exposedDatabase diff --git a/lib/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/VertxSqlClients.kt b/lib/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/VertxSqlClients.kt index f8feac9..6ec1cc3 100644 --- a/lib/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/VertxSqlClients.kt +++ b/lib/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/VertxSqlClients.kt @@ -2,7 +2,7 @@ package com.huanshankeji.exposedvertxsqlclient import com.huanshankeji.Untested import io.vertx.core.Vertx -import io.vertx.kotlin.coroutines.await +import io.vertx.kotlin.coroutines.coAwait import io.vertx.kotlin.sqlclient.poolOptionsOf import io.vertx.pgclient.PgConnectOptions import io.vertx.pgclient.PgConnection @@ -34,7 +34,7 @@ private val pgConnectionConnect: suspend (Vertx?, PgConnectOptions, Nothing?) -> */ suspend fun SqlConnection.executeSetRole(role: String) = - query("SET ROLE $role").execute().await() + query("SET ROLE $role").execute().coAwait() // TODO: use `ConnectionConfig` as the argument directly in all the following functions @@ -82,7 +82,7 @@ suspend fun createSocketPgConnection( createSocketGenericPgClient( vertx, host, port, database, user, password, extraPgConnectOptions, null ) { vertx, pgConnectOptions, _ -> - PgConnection.connect(vertx, pgConnectOptions).await() + PgConnection.connect(vertx, pgConnectOptions).coAwait() } @@ -121,7 +121,7 @@ suspend fun createUnixDomainSocketPgSqlClientAndSetRole( vertx, host, database, extraPgConnectOptions, poolOptions ).apply { // Is this done for all connections? - query("SET ROLE $role").execute().await() + query("SET ROLE $role").execute().coAwait() } fun createPeerAuthenticationUnixDomainSocketPgPool( @@ -144,7 +144,7 @@ fun createPeerAuthenticationUnixDomainSocketPgPoolAndSetRole( // TODO: are exceptions handled? it.executeSetRole(role) /** @see Pool.connectHandler */ - it.close().await() + it.close().coAwait() } } @@ -157,7 +157,7 @@ suspend fun createPeerAuthenticationUnixDomainSocketPgConnectionAndSetRole( createPeerAuthenticationUnixDomainSocketGenericPgClient( vertx, host, database, extraPgConnectOptions, null ) { vertx, pgConnectOptions, _ -> - PgConnection.connect(vertx, pgConnectOptions).await().apply { + PgConnection.connect(vertx, pgConnectOptions).coAwait().apply { executeSetRole(role) } } From de09f995df561df88c0df91f08bf90e0dc899620 Mon Sep 17 00:00:00 2001 From: Yongshun Shreck Ye Date: Thu, 14 Nov 2024 18:15:41 +0800 Subject: [PATCH 6/6] Review the actual arguments of the type parameter `T` in `UpdateBuilder` and see if there is a need to replace some `UpdateBuilder<*>` with `UpdateBuilder` `T` seems to mean the update count. Currently, there are only `Int` type arguments passed, but it seems reserved for `Long`.