Skip to content

Major Kotlin DSL Improvement #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Apr 28, 2021
Merged

Conversation

jeffgbutler
Copy link
Member

This large PR has the following general themes:

  1. Build out the full DSL for Kotlin. This avoids the use of the Java DSL entry points in SqlBuilder, more accurately expresses the nullability expectations of the DSL, and eliminates the platform types inferred from using the Java DSL in Kotlin
  2. Add a few missing capabilities to the Kotlin DSL
  3. Explicitly specify the return types for all Kotlin functions in keeping with community recommendations for a Kotlin library
  4. Update the recommended Kotlin meta-model pattern in all tests
  5. Improve the documentation for the Kotlin DSL

- Remove dependency on org.mybatis.dynamic.sql.SqlBuilder as this causes name collisions in some cases
- Explicitly denote the nullability aspects of the API
- Specify all return types per Kotlin Library coding conventions
They cause weird overload issues and the don't make much sense anymore as
the underlying Java code doesn't use them.
# Conflicts:
#	src/test/kotlin/examples/kotlin/mybatis3/canonical/ReusableWhereTest.kt
# Conflicts:
#	src/test/java/examples/simple/PersonMapperTest.java
# Conflicts:
#	src/main/java/org/mybatis/dynamic/sql/util/ValueOrNullMapping.java
@jeffgbutler jeffgbutler added this to the 1.3.0 milestone Apr 28, 2021
@coveralls
Copy link

coveralls commented Apr 28, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling db492fe on jeffgbutler:kotlin-dsl-update into 3962a17 on mybatis:master.

@jeffgbutler jeffgbutler merged commit d023ee8 into mybatis:master Apr 28, 2021
@jeffgbutler jeffgbutler deleted the kotlin-dsl-update branch April 28, 2021 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants