com.dbobjekts.metadata.joins.JoinBase.kt Maven / Gradle / Ivy
package com.dbobjekts.metadata.joins
import com.dbobjekts.api.AnyColumn
import com.dbobjekts.api.AnyTable
import com.dbobjekts.metadata.Table
abstract class JoinBase(val leftPart: AnyColumn,
val rightPart: AnyColumn) {
abstract val keyWord: String
val conditionSQL: String = "${rightPart.table.toSQL()} on ${leftPart.aliasDotName()} = ${rightPart.aliasDotName()}"
override fun toString(): String = "${leftPart.table.toSQL()} $keyWord $conditionSQL"
fun containsTable(table: AnyTable): Boolean = leftPart.table == table || rightPart.table == table
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy