babyfish-ct / jimmer

A revolutionary ORM framework for both java and kotlin.
Apache License 2.0
882 stars 91 forks source link

Add KConfigurableRootQuery exists function #788

Closed pot-mot closed 1 week ago

pot-mot commented 1 week ago

Add a function for KConfigurableRootQuery

fun exists(con: Connection? = null): Boolean =
    limit(1)
        .reselect { select(constant(1)) }
        .execute(con).isEmpty()
babyfish-ct commented 1 week ago

isNotEmpty