Skip to content

Commit

Permalink
#424 Deprecate InsertStatement.generatedKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapac committed Nov 17, 2018
1 parent 9e12a11 commit 864e4fb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import java.sql.SQLException
open class InsertStatement<Key:Any>(val table: Table, val isIgnore: Boolean = false) : UpdateBuilder<Int>(StatementType.INSERT, listOf(table)) {
protected open val flushCache = true
protected var resultedValues: List<Map<Column<*>, Any>>? = null
@Deprecated("Will be made internal on the next releases")
open val generatedKey: Key? get() = autoIncColumns.firstOrNull()?.let { get(it) } as Key?

infix operator fun <T> get(column: Column<T>): T? = resultedValues?.get(0)?.get(column)?.let { column.columnType.valueFromDB(it )} as? T
Expand Down

0 comments on commit 864e4fb

Please sign in to comment.