Release Notes

Kronos strictly adheres to the Semantic Versioning 2.0.0 specification.

Update Logs

0.4.0

Upgrade notes

0.3.1

Upgrade notes

0.3.0

Upgrade notes

0.2.4

Upgrade notes

0.2.3

0.2.2

0.2.1

0.2.0

0.2.0 contains source- and binary-incompatible public API changes. Recompile the project after upgrading and update call sites and custom integrations as described below.

Breaking API changes

Query terminal operations now use collection-conversion and single-row terminology consistently:

0.1.x0.2.0
query()toMapList() / toList<Map<String, Any?>>()
queryList<T>()toList<T>()
queryMap()toMap() / first<Map<String, Any?>>()
queryMapOrNull()toMapOrNull() / firstOrNull<Map<String, Any?>>() / first<Map<String, Any?>?>()
queryOne<T>()first<T>()
queryOneOrNull<T>()firstOrNull<T>() / first<T?>()
PagedClause.query()PagedClause.toMapList()
PagedClause.queryList()PagedClause.toList()

toMapList(), toMap(), and toMapOrNull() are convenience methods for the corresponding generic forms; in general, firstOrNull<T>() is also equivalent to first<T?>(). Map query results now use Map<String, Any?>, preserving selected SQL NULL values. QueryType is reduced to ToMapList, ToList, ToMap, and First; projects that inspect query events must update their enum branches. Raw SQL extensions now come from com.kotlinorm.database.SqlExecutor, and the former SqlHandler object has been removed.

The built-in JDBC wrapper is now consistently exposed as KronosJdbcWrapper. Projects upgrading from older releases that still use the legacy KronosBasicWrapper must update both the class and package name:

// Legacy API
import com.kotlinorm.KronosBasicWrapper
val wrapper = KronosBasicWrapper(dataSource)

// 0.2.0
import com.kotlinorm.wrappers.KronosJdbcWrapper
val wrapper = KronosJdbcWrapper(dataSource)

Custom KronosDataSourceWrapper implementations must replace forList, forMap, and forObject with the following two query entry points. Read the result mapping target from task.targetType:

override fun toList(task: KAtomicQueryTask): List<Any?>
override fun first(task: KAtomicQueryTask): Any?

Query tasks and the conversion pipeline now carry complete Kotlin KType metadata:

Features and fixes

0.1.2

0.1.1

0.1.0

0.0.7

0.0.6

0.0.5

0.0.4

0.0.3

0.0.2

0.0.1

Use Snapshot Versions

Snapshot versions provide early access to the next release for development and evaluation.

Maven Central Snapshots

Add the snapshot repository to plugin and dependency resolution, then use the snapshot coordinate.

gradle(groovy)

// settings.gradle
pluginManagement {
    repositories {
        mavenCentral()
        maven {
            url "https://central.sonatype.com/repository/maven-snapshots/"
        }
    }
}

// build.gradle
repositories {
    mavenCentral()
    maven {
        url "https://central.sonatype.com/repository/maven-snapshots/"
    }
}

plugins {
    id 'com.kotlinorm.kronos-gradle-plugin' version '0.4.1-SNAPSHOT'
}

dependencies {
    implementation "com.kotlinorm:kronos-core:0.4.1-SNAPSHOT"
    implementation "com.kotlinorm:kronos-jdbc-wrapper:0.4.1-SNAPSHOT"
}

gradle(kts)

// settings.gradle.kts
pluginManagement {
    repositories {
        mavenCentral()
        maven {
            name = "Maven Central Snapshots"
            url = uri("https://central.sonatype.com/repository/maven-snapshots/")
        }
    }
}

// build.gradle.kts
repositories {
    mavenCentral()
    maven {
        name = "Maven Central Snapshots"
        url = uri("https://central.sonatype.com/repository/maven-snapshots/")
    }
}

plugins {
    id("com.kotlinorm.kronos-gradle-plugin") version "0.4.1-SNAPSHOT"
}

dependencies {
    implementation("com.kotlinorm:kronos-core:0.4.1-SNAPSHOT")
    implementation("com.kotlinorm:kronos-jdbc-wrapper:0.4.1-SNAPSHOT")
}

maven

<project>
  <properties>
    <kronos.version>0.4.1-SNAPSHOT</kronos.version>
  </properties>

  <repositories>
    <repository>
      <id>maven-central-snapshots</id>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>com.kotlinorm</groupId>
      <artifactId>kronos-core</artifactId>
      <version>${kronos.version}</version>
    </dependency>
    <dependency>
      <groupId>com.kotlinorm</groupId>
      <artifactId>kronos-jdbc-wrapper</artifactId>
      <version>${kronos.version}</version>
    </dependency>
  </dependencies>

  <pluginRepositories>
    <pluginRepository>
      <id>maven-central-snapshots</id>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <compilerPlugins>
            <plugin>all-open</plugin>
            <plugin>kronos-maven-plugin</plugin>
          </compilerPlugins>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-maven-allopen</artifactId>
            <version>${kotlin.version}</version>
          </dependency>
          <dependency>
            <groupId>com.kotlinorm</groupId>
            <artifactId>kronos-maven-plugin</artifactId>
            <version>${kronos.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>

Kotlin Compatibility

Kronos versionSupported Kotlin versionNotes
0.4.02.4.21Kotlin Multiplatform: JVM, Android/JVM and Kotlin/Native
0.3.12.4.0+H2 and DM8 dialects, JDBC connection and row mapping, and Kotlin String / cross-dialect SQL functions
0.3.02.4.0+Android/JVM SQLite support; see the Android SQLite guide
0.2.0 - 0.2.42.4.0+Kotlin 2.4.0 release line
0.1.22.4.0+Fixes schema synchronization edge cases and expands cross-database integration coverage
0.1.12.4.0+Adds projection docs and release automation improvements
0.1.02.3.0+Stable release line based on Kotlin 2.3.0
0.0.72.3.0+Upgraded Gradle and Kotlin in the 0.0.7 release
0.0.62.2.21+Added kotlin.time.Instant support
0.0.2 - 0.0.52.2.0+Early development releases before the 2.2.21 upgrade
0.0.12.1.0+Initial public release line