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

query.ddl.DropTable.kt Maven / Gradle / Ivy

There is a newer version: 1.1.10
Show newest version
package query.ddl

import ast.statement.ddl.SqlDropTable
import ast.expr.SqlIdentifierExpr
import database.DB
import query.ReviseQuery
import util.toSqlString
import java.sql.Connection

class DropTable(
    var db: DB = DB.MYSQL,
    override var conn: Connection? = null,
    override var isTransaction: Boolean = false
) : ReviseQuery() {
    constructor(db: DB) : this(db, null, false)

    private var sqlDropTable = SqlDropTable()

    infix fun drop(table: String): DropTable {
        sqlDropTable.table = SqlIdentifierExpr(table)
        return this
    }

    override fun sql() = toSqlString(sqlDropTable, db)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy