• rcd27

    rcd27

    1 year ago
    Is there any way to execute custom "plain" statements via
    Exposed
    ? Or should I just use plain old Java interface for that? I have these one: (just trying to implement full-text-search in postgres)
    rcd27
    b
    4 replies
    Copy to Clipboard
  • Antonio Acuña Prieto

    Antonio Acuña Prieto

    1 year ago
    Do I need to create a mapper fun to transform ResultRow to the class I want? Something like: Articles.select { Articles.id eq I’d }.map { toArticle(it) }.single()
    Antonio Acuña Prieto
    1 replies
    Copy to Clipboard
  • d

    Damien

    1 year ago
    Hi, how can I reference aliased columns from a subquery and use within a top-level function.. e.g. (greatly simplified for illustrative purposes)
    select sum(subQuery.myCol + subQuery.myCol) from (select col as myCol) subQuery
    I have my subselect working, have my column alias working, I can select by the alias (e.g.
    select subQuery.myCol from (select...)
    ). But I cannot figure out how to construct further functions from the aliased columns. I essentially have multiple aliased columns in a subselect and I wish to multiply them in some way and query the result. Appreciate any insight! No idea where to start (QueryBuilder?)
    d
    1 replies
    Copy to Clipboard
  • Ali Olfat

    Ali Olfat

    1 year ago
    I have four tables all with 5 common columns. Is there a way to extract out the common columns into their own class as part of the DSL? Is that what CompositeColumn is for?
    Ali Olfat
    1 replies
    Copy to Clipboard
  • Jgafner

    Jgafner

    1 year ago
    Hi probably a dummy question and I am missing something - how do I translate this query in the code:
    select *
    from regression_notifications rn
             join notification_checks nc on rn.id = nc.regression_id
             join check_issues ci on nc.id = ci.check_id
    where ci.status = "Open"
    I tried:
    RegressionTable.join(CheckTable.join( IssueTable,JoinType.INNER),JoinType.INNER).select { IssueTable.status eq "Open" }
    but it return different results thanks
    Jgafner
    1 replies
    Copy to Clipboard
  • a

    Austin Paquette

    1 year ago
    Hey, there's an issue on this already but no response (and nothing on the roadmap) about the ability to have a many-to-many reference setup where the junction table needs an additional attribute, I cannot find anyone else that has tried and succeeded. I'm not quite dangerous enough with Kotlin (yet?) to implement such a feature myself so I was hoping to get some guidance on some options. 🧵
    a
    1 replies
    Copy to Clipboard
  • Nayeem Zen

    Nayeem Zen

    1 year ago
    Also is there any planning of doing codegen similar to jooq to generate the tables/entities from the database? We were considering using Flyway for migrations so redefining tables structure entities in sql and again in kotlin code would lead to some duplicated source of truth
    Nayeem Zen
    b
    +1
    5 replies
    Copy to Clipboard
  • t

    Trevor Merritt

    1 year ago
    Anyone know of a library like Ruby's 'papertrail' for Exposed? I'm subclassing the IntIdTable to add before and after hooks, but if someone else has already done it, no need to reinvent the wheel. 🙂
    t
    h
    2 replies
    Copy to Clipboard
  • TwoClocks

    TwoClocks

    1 year ago
    do read-only queries need to be done in a transaction as well?
    TwoClocks
    1 replies
    Copy to Clipboard
  • l

    Lbenyehu

    1 year ago
    Hi guys! I didn’t find any explanation how to create a table (postgres in my case) with partitions… someone know??
    l
    rcd27
    7 replies
    Copy to Clipboard