All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dbobjekts.api.TableRowData.kt Maven / Gradle / Ivy

There is a newer version: 0.6.0-RC2
Show newest version
package com.dbobjekts.api

import com.dbobjekts.metadata.column.IsGeneratedPrimaryKey
import com.dbobjekts.statement.WriteQueryAccessors
import com.dbobjekts.statement.insert.InsertBuilderBase
import com.dbobjekts.statement.update.UpdateBuilderBase

abstract class TableRowData(
    internal val writeAccessors: WriteQueryAccessors
) {
    abstract val primaryKeys: List>
    internal fun hasGeneratedPrimaryKey(): Boolean = primaryKeys.any { it.first is IsGeneratedPrimaryKey }
    internal fun getAutoGeneratedPkValue(): Long = if (hasGeneratedPrimaryKey()) primaryKeys.first().second.toString().toLong() else 0
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy