• codec

    codec

    2 years ago
    @tapac At some point, will Exposed have Redis interfaces/support?
    codec
    tapac
    2 replies
    Copy to Clipboard
  • t

    Tmpod

    2 years ago
    Hey! How's the coroutine support on this library? I'm looking for a coroutine-powered library to interact with postgres, but I can't really find any 😕
    t
    w
    2 replies
    Copy to Clipboard
  • Rodrigo Silva

    Rodrigo Silva

    2 years ago
    Hello all. How can i do this?
    Rodrigo Silva
    3 replies
    Copy to Clipboard
  • s

    Slackbot

    2 years ago
    This message was deleted.
    s
    Rodrigo Silva
    2 replies
    Copy to Clipboard
  • Bornyls Deen

    Bornyls Deen

    2 years ago
    Hi everyone, I'm struggling to achieve a Postgres distinct on/order by query using the Exposed DSL... I'm looking to execute something like this
    select distinct on
        (cats.name) cats
    from 
        groups_cats
    inner join
        cats
    on
        groups_cats.cat_id = cats.id
    where
        groups_cats.cat_id = 25
    order by 
        cats.name, groups.created desc
    I've managed to come up with this
    GroupsCats
        .join(Cats, JoinType.INNER) { Cats.id eq GroupsCats.catId }
        .select { GroupsCats.catId eq catId }
        .orderBy(Cats.created to SortOrder.DESC)
    But I can't figure out how to make the result distinct on a particular column (cat name in this case)... the
    withDistinct()
    method sounded hopeful but doesn't seem to work in the way that I need. If anyone has any ideas/suggestions I would really appreciate it.
    Bornyls Deen
    Kenneth Wußmann
    +1
    6 replies
    Copy to Clipboard
  • j

    John Towell

    2 years ago
    has anyone made the jump from spring-boot/spring-data/JPA to spring-boot/exposed?
    j
    1 replies
    Copy to Clipboard
  • neetkee

    neetkee

    2 years ago
    We have a strange behaviour using Exposed with spring boot and hikari with maximum pool size 1. We use this size of pool in local/test environments, and we get an error:
    HikariPool-1 - Connection is not available, request timed out after 30005ms
    Quick debugging showed, that Exposed is trying to acquire some metadata about database before transaction started. This is as far as I can get before error: org/jetbrains/exposed/sql/Database.kt:22. Is it an expected behaviour and exposed requires minimum amount of connections when used with spring, or is it something that can be fixed?
    neetkee
    tapac
    4 replies
    Copy to Clipboard
  • p

    pafmaf

    2 years ago
    I was using driver class
    com.impossibl.postgres.jdbc.PGDriver
    , since
    24.1
    it doesn't seem to be recognized as a postgre dialect 🤔 . Anyone got a hint before I go debugging? EDIT: nvm, found it, has it's own dialect name ("pgsql") now
    p
    1 replies
    Copy to Clipboard
  • i

    Iaroslav Postovalov

    2 years ago
    @tapac Hello! Is there any information about reviewing this PR: https://github.com/JetBrains/Exposed/pull/915?
    i
    tapac
    2 replies
    Copy to Clipboard
  • k

    kushalp

    2 years ago
    I am currently on Exposed
    0.17.3
    and I'm trying to upgrade to
    0.25.1
    . A recent change has meant that I am seeing the following error when using
    Database.connect
    with org.apache.tomcat.jdbc.pool.DataSource:
    Overload resolution ambiguity. All these functions match.
    public final fun connect(datasource: ConnectionPoolDataSource, setupConnection: (Connection) → Unit = ..., manager: (Database) → TransactionManager = ...): Database defined in org.jetbrains.exposed.sql.Database.Companion
    public final fun connect(datasource: DataSource, setupConnection: (Connection) → Unit = ..., manager: (Database) → TransactionManager = ...): Database defined in org.jetbrains.exposed.sql.Database.Companion
    k
    j
    15 replies
    Copy to Clipboard