• Patrick Doering

    Patrick Doering

    1 year ago
    Hey, is it right that exposed is not usable with JS?
    Patrick Doering
    Kenneth Wußmann
    2 replies
    Copy to Clipboard
  • Yoavya

    Yoavya

    1 year ago
    Hi question about auto-fill created and updated columns: It seems like if I don’t use the Entity to update the table (using the DSL API) then the updated field is not treated As I understand it Entity hooks only apply to entity related changes and not to changes directly to the table using the DSL API. is there a way to do the same when using the DSL API to also auto-fill the updated column?
    Yoavya
    tapac
    +1
    10 replies
    Copy to Clipboard
  • d

    Das135

    1 year ago
    Hi! Is it possible to use custom column with custom alias in exposed query? I mean column that is not in Table definition. I need something like this:
    SELECT 'custom1' as custom, id, name, address FROM persons
    d
    b
    2 replies
    Copy to Clipboard
  • i

    Ivan

    1 year ago
    Hi, there is any way to create kotrin coroutine flow from exposed query?
    i
    b
    3 replies
    Copy to Clipboard
  • JP

    JP

    1 year ago
    What is the best practice for DB migrations with Exposed? I want to use Flyway, but I'm having trouble seeing how it doesn't defeat the purpose of an ORM in some ways. Meaning, if I add Flyway, I have to add all the table definitions into a file and a upscript every time I want to change the schema along with modifying the Exposed table models. Is there an better way to do this? I thought I might be able to use the Flyway API and run the migrations after I create all of the tables with Exposed, but I'm having trouble getting this to work because Flyway wants to have table definitions in its history. Does anyone have experience with this, or best practice recommendations? At the end of the day, I'm just trying to add persistent data to my database without having it repeatedly inserted (i.e., every time I run the application, which is what a
    transaction
    would do in Exposed). If there is another tool other than Flyway that might be better suited for this, then I'd be happy to hear about that as well.
    JP
    j
    +1
    3 replies
    Copy to Clipboard
  • Joel

    Joel

    1 year ago
    val fullName: String get() = listOfNotNull(firstName, lastName).joinToString(" ")
    
        private var cachedFullName by UserDetailsTable.fullName
    
        companion object : EntityClass<String, UserDetailsView>(UserDetailsTable) {
            init {
                EntityHook.subscribe { action ->
                    action.toEntity(this)?.let { it.cachedFullName = it.fullName }
                }
            }
        }
    Is there a cleaner way to set a computed value using the DAO?
    Joel
    tapac
    3 replies
    Copy to Clipboard
  • Kenneth Wußmann

    Kenneth Wußmann

    1 year ago
    Hey, is there a way to force load all results from a
    SELECT
    with all relations to memory?
    Kenneth Wußmann
    b
    +1
    3 replies
    Copy to Clipboard
  • JP

    JP

    1 year ago
    What's the best way to wait to execute a
    transaction
    ? I want to take one in as a parameter in a function, and then execute the transaction. However, I've only ever seen it in the inline style of
    transaction {...}
    and having it execute there
    JP
    Joel
    7 replies
    Copy to Clipboard
  • Ben Tzou

    Ben Tzou

    1 year ago
    is it possible to prefix generated sql with a comment for tracking?
    Ben Tzou
    1 replies
    Copy to Clipboard
  • JP

    JP

    1 year ago
    Is there a way to dynamically modify tables? Instead of adding a new column in the table definition, can I do something like
    transaction{
       Table.addColumn(...)
    }
    ?
    JP
    r
    6 replies
    Copy to Clipboard