Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split modules, completely overhaul the client creation APIs, and decouple PostgreSQL, our SQL DSL APIs, and our mapper SQL DSL APIs #16

Open
wants to merge 26 commits into
base: dev-dependent-on-snapshots
Choose a base branch
from

Commits on Nov 15, 2024

  1. Create modules/subprojects to split code into, and move the example a…

    …nd benchmark code into the module "integrated"
    
    IntelliJ IDEA Code Analysis shows there are 5 errors.
    ShreckYe committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    c534750 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    58f65e3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e101fc8 View commit details
    Browse the repository at this point in the history
  4. Generalize the functions in "DatabaseClient.kt" using PgPool and `P…

    …gConnection` for different DBs, replacing them with `Pool` and `Connection`
    
    A new `withTypedTransaction` function is added and `withPgTransaction` is moved into the `postgresql` package.
    ShreckYe committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    7b0fc9f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e959812 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2024

  1. Initially overhaul and reorganize the APIs

    Major changes:
    
    1. move some code to finer-grained subpackages
    1. initially overhaul the APIs related to the creation of Vert.x SQL clients and `DatabaseClient`s
    
       The `create...andSetRole` functions are removed, and their functionalities are merged into the `create...` functions.
    
    1. add TODOs as guidance for the remaining work
    ShreckYe committed Nov 16, 2024
    Configuration menu
    Copy the full SHA
    dfd0d3b View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2024

  1. Move "VertxSqlClients.kt"

    ShreckYe committed Nov 17, 2024
    Configuration menu
    Copy the full SHA
    6b1547e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    21d34c5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    603dbb7 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2024

  1. Completely overhaul the client creation APIs

    1. move code related to `PostgreSQL` into the `postgreql` package
    1. refactor the Vert.x `SqlClient` and Exposed `Database` creation APIs to be more configurable and straightforward
    1. extract some common functions for JDBC, Exposed, and Vert.x
    1. move the example code into the `main` source set
    1. remove the extra `DatabaseClient` creation APIs `create*DatabaseClient`
    1. adopt `EvscConfig` as the single-source-of-truth client config
    1. add some more TODOs
    1. update the example code README.md correspondingly
    ShreckYe committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    fdc2023 View commit details
    Browse the repository at this point in the history
  2. Update README.md

    ShreckYe committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    198ebf2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d4773cd View commit details
    Browse the repository at this point in the history
  4. Remove default arguments in the createGeneric... functions because …

    …users usually don't call them directly and by doing this we don't forget to pass arguments in a caller
    ShreckYe committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    496c354 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    82b23fa View commit details
    Browse the repository at this point in the history
  6. Move a TODO

    ShreckYe committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    cecd5be View commit details
    Browse the repository at this point in the history
  7. Add a "sql-dsl" module

    ShreckYe committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    d0e1f3e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ef6d3d1 View commit details
    Browse the repository at this point in the history
  9. Resolve a build issue in the benchmarks source set of the "integrat…

    …ed" module
    
    ```text
    Execution failed for task ':exposed-vertx-sql-client-integrated:compileBenchmarksKotlin'.
    > Could not resolve all files for configuration ':exposed-vertx-sql-client-integrated:benchmarksCompileClasspath'.
       > Could not resolve all dependencies for configuration ':exposed-vertx-sql-client-integrated:benchmarksCompileClasspath'.
          > Could not find io.vertx:vertx-sql-client:.
            Required by:
                project :exposed-vertx-sql-client-integrated > project :exposed-vertx-sql-client-core
    ```
    ShreckYe committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    daf69d7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2d7b2a5 View commit details
    Browse the repository at this point in the history
  11. Move the code that belongs to the modules "sql-dsl" and "sql-dsl-with…

    …-mapper" into these modules
    
    Miscellaneous changes:
    1. remove the PostgreSQL dependencies in the "core" module
    1. add and use the `@InternalApi` opt-in annotation
    1. update `executeExpression` to throw since the core module doesn't depend on the "sql-dsl" module anymore
    1. add an example of `DatabaseClient.selectExpression` with `exists` in the example code
    ShreckYe committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    59a26a6 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6eb83a7 View commit details
    Browse the repository at this point in the history
  13. Print the number of processors and add a comment in `multiThreadMulti…

    …ConnectionEach10KLocalTransactions`
    ShreckYe committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    263cc5c View commit details
    Browse the repository at this point in the history
  14. Add multiThreadConcurrent10KTransactionsWithThreadLocalDatabases an…

    …d `multiThreadConcurrent10KTransactionsWithImplicitThreadLocalDatabases` into the benchmark code, fix `singleThreadConcurrent10KTransactions` which actually runs on multiple threads instead of one BTW, and improve `multiThreadConcurrent10KTransactionsWithSharedDatabase` BTW
    ShreckYe committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    210529d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    3715550 View commit details
    Browse the repository at this point in the history
  16. Make CoroutineScope the receiver in awaitAsync10KTransactions and…

    … extract `awaitAsync10K`
    ShreckYe committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    920627f View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    9a93c0e View commit details
    Browse the repository at this point in the history