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

com.sxtanna.database.task.builder.UpdateBuilder.kt Maven / Gradle / Ivy

There is a newer version: 3.0-beta
Show newest version
package com.sxtanna.database.task.builder

import com.sxtanna.database.type.base.SqlObject
import kotlin.reflect.KClass

data class UpdateBuilder(val clazz : KClass, val table : String) : WhereBuilder>() {

	val ignoring = mutableSetOf()

	fun ignore(vararg column : String) : UpdateBuilder {
		ignoring.addAll(column.map { it.toLowerCase() })
		return this
	}


	companion object Update {

		@JvmSynthetic
		inline fun  where(table : String = T::class.simpleName!!) = UpdateBuilder(T::class, table)

		@JvmOverloads
		fun  where(clazz : Class, table : String = clazz.simpleName!!) = UpdateBuilder(clazz.kotlin, table)

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy