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

query.ReviseQuery.kt Maven / Gradle / Ivy

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

/**
 * 非查询类dsl基类
 */
abstract class ReviseQuery : BasedQuery {
    /**
     * 执行sql语句,并返回受影响行数
     * @return Int 受影响行数
     */
    open fun exec(): Int {
        val result = database.exec(conn!!, this.sql())
        if (!isTransaction) {
            conn!!.close()
        }
        return result
    }

    /**
     * 生成sql
     * @return String sql语句
     */
    override fun toString(): String {
        return sql()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy