• tapac

    tapac

    4 years ago
    Exposed 0.10.3 was released (https://bintray.com/kotlin/exposed/exposed/0.10.3) Features:1. Floating point columns 2. Check constraint functionallity (kudos to @SackCastellon) 3. Possibility to provide custom names for contraints and indexes (thanks to @mduesterhoeft) 4. Added support to delete with limit and offset (thanks @Yuku Kotani for initial PR) 5. Full SQL will be now logged on any SQLException (#288 [Suggestion] Log the SQL query when an exception is thrown) 6. Postgres support for ignore + replace 7. H2 support for INSERT IGNORE for new H2 version 8. Statement interceptors now allow triggering on before commit and rollback 9. Database ENUM types supported (read more [here](https://github.com/JetBrains/Exposed/wiki/DataTypes#how-to-use-database-enum-types)) Bug fixes:1. #279 'SELECT MAX(datetime)' throws ClassCastException 2. #289 UUID's are not shown in logs 3. #284 Postgres, DSL Approach: primary key with custom names beside `...
    tapac
    s
    4 replies
    Copy to Clipboard
  • s

    samir

    4 years ago
    @tapac Next release?
    s
    tapac
    2 replies
    Copy to Clipboard
  • mkporwit

    mkporwit

    4 years ago
    I see that there’s an
    onDelete = ReferenceOption.CASCADE
    for foreign key constraints. Is there support for something like MySQL’s
    ON UPDATE CASCADE
    ?
    mkporwit
    tapac
    2 replies
    Copy to Clipboard
  • frellan

    frellan

    4 years ago
    Hello guys! I am planning on moving to this library for persistence, planning to use the DSL since I want more control of my sqls. Just a general question really, how do one handle nested relations with a dsl approach? One may want to have relations on the domain model but don’t load them all the time, so they would be null, so you would end up with a lot of stuff that is null, which is not nice. How do you guys do this? Remove the relations from the domain model and just keep the relations in the database, i.e dont do
    entity.otherEntites
    but rather
    DB.getOtherEntetiesFor(entity)
    or similar. How do you do this, need tips 🙂
    frellan
    tapac
    3 replies
    Copy to Clipboard
  • mkporwit

    mkporwit

    4 years ago
    That’s fine, but there’s no way for me to specify utf8mb4 as either the
    characterEncoding
    or the
    characterSetResults
    . Exposed blows up with an
    ExceptionInInitializedError
    . If
    characterSetResults=utf8mb4
    is specified on the connect string, the underlying exception is
    java.sql.SQLException: Can't map utf8mb4 given for characterSetResults to a supported MySQL encoding.
    , and if I do
    characterEncoding=utf8mb4
    , it is
    java.sql.SQLException: Unsupported character encoding 'utf8mb4'
    .
    mkporwit
    1 replies
    Copy to Clipboard
  • s

    Sherub Thakur

    4 years ago
    Hi there can I catch specific exceptions instead of just a blanket exception (
    ExposedSQLException
    )? Right now I have to do string processing on the message given by the exception to perform any task. Something like
    RefrentialIntegrityConstraintViolationException
    or
    UniqueConstraintViolationException
    etc would be really helpful.
    s
    1 replies
    Copy to Clipboard
  • b

    bubakovsky

    4 years ago
    Hi! I'm a bit new to ORM and DB connection in app. I've switched from DAO to DSL way because of better separation between data and code (multitier architecture). Question - what would you recommend to access values from referenced columns (like in DAO way)? I'm talking about using
    data class
    in higher tiers. Only possible way I could come up with is to create
    Map
    for every 1:N relationship, which might be very monstrous in the end. How do you usually deal with that? Thanks for the reply in advance!
    b
    tapac
    2 replies
    Copy to Clipboard
  • mkporwit

    mkporwit

    4 years ago
    Any ideas when 0.10.4 will be out, @tapac?
    mkporwit
    tapac
    2 replies
    Copy to Clipboard
  • n

    Norg

    4 years ago
    Hi everyone! Can anyone answer, is there nested transactions support?
    n
    tapac
    +1
    6 replies
    Copy to Clipboard
  • tapac

    tapac

    4 years ago
    So first, how the heck does this even work? I can’t seem to figure it out from reading the source.
    inList and other functions declared within SqlExpressionBuilder that’s why you can’t access them out of select {} block, which defined as :
    inline fun FieldSet.select(where: SqlExpressionBuilder.()->Op<Boolean>)
    tapac
    1 replies
    Copy to Clipboard