Skip to content

What is the terpal equivalent of Jdbi.open() and JDBC's .connection.use? #10

@cies

Description

@cies

What is the equivalent of these "db scopes" in Jdbi and JDBC, in terpal-sql?

jdbi.open().use { db ->
    val orgDao = dbtx.attach(OrganizationDao::class.java)
    val orgs = orgDao.listOrganizations()
    // ...
}
db.database.connection.use { jdbc ->
     jdbc.prepareStatement("....").execute()
}

Are these connections? Or sessions? Or transactions? (nah, they are for sure not transactions; transactions are opened in a different way)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions