![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
org.komapper:komapper-jdbc-mysql
Advanced tools
Komapper is an ORM library for server-side Kotlin.
For more documentation, go to our site:
Komapper is tested with the following databases:
Database | version | JDBC support | R2DBC support |
---|---|---|---|
H2 Database | 2.3.230 | v | v |
MariaDB | 10.6.3 | v | v |
MySQL v5.x | 5.7.44 | v | v |
MySQL v8.x | 8.0.25 | v | v |
Oracle Database XE | 18.4.0 | v | v |
PostgreSQL | 12.9 | v | v |
SQL Server | 2019 | v | (unstable) |
Supported connectivity types:
Add the following code to the Gradle build script (gradle.build.kts).
plugins {
kotlin("jvm") version "2.1.0"
id("com.google.devtools.ksp") version "2.1.0-1.0.29"
}
val komapperVersion = "5.1.0"
dependencies {
platform("org.komapper:komapper-platform:$komapperVersion").let {
implementation(it)
ksp(it)
}
implementation("org.komapper:komapper-starter-jdbc")
implementation("org.komapper:komapper-dialect-h2-jdbc")
ksp("org.komapper:komapper-processor")
}
See also Quickstart for more details:
To get complete code, go to our example repository.
@KomapperEntity
data class Address(
@KomapperId
@KomapperAutoIncrement
@KomapperColumn(name = "ADDRESS_ID")
val id: Int = 0,
val street: String,
@KomapperVersion
val version: Int = 0,
@KomapperCreatedAt
val createdAt: LocalDateTime? = null,
@KomapperUpdatedAt
val updatedAt: LocalDateTime? = null,
)
fun main() {
// create a Database instance
val db = JdbcDatabase("jdbc:h2:mem:example;DB_CLOSE_DELAY=-1")
// get a metamodel
val a = Meta.address
// execute simple operations in a transaction
db.withTransaction {
// create a schema
db.runQuery {
QueryDsl.create(a)
}
// INSERT
val newAddress = db.runQuery {
QueryDsl.insert(a).single(Address(street = "street A"))
}
// SELECT
val address = db.runQuery {
QueryDsl.from(a).where { a.id eq newAddress.id }.first()
}
}
}
suspend fun main() {
// create a Database instance
val db = R2dbcDatabase("r2dbc:h2:mem:///example;DB_CLOSE_DELAY=-1")
// get a metamodel
val a = Meta.address
// execute simple operations in a transaction
db.withTransaction {
// create a schema
db.runQuery {
QueryDsl.create(a)
}
// INSERT
val newAddress = db.runQuery {
QueryDsl.insert(a).single(Address(street = "street A"))
}
// SELECT
val address = db.runQuery {
QueryDsl.from(a).where { a.id eq newAddress.id }.first()
}
}
}
See DESIGN_DOC for the design policy of this project.
Kotlin and KSP version | Komapper version | KSP2 support? | JRE min version | Gradle min version |
---|---|---|---|---|
1.9.24-1.0.20 | 1.18.1 - 2.x | No | 11 | 6.8.3 |
2.0.0-1.0.28 | 2.x - 5.x | Yes | 11 | 7.6.4 |
2.1.0-1.0.29 | 5.x | Yes | 11 | 7.6.4 |
Compatibility testing is performed in the komapper/compatibility-test repository.
If you use Komapper in your project or enterprise and would like to support ongoing development, please consider becoming a backer. [Become a backer]
Our top backers are shown below!
FAQs
Unknown package
We found that org.komapper:komapper-jdbc-mysql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.