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

io.lenses.jdbc4.statements.ReadOnlyStatement.kt Maven / Gradle / Ivy

There is a newer version: 3.0.2
Show newest version
package io.lenses.jdbc4.statements

import java.sql.SQLFeatureNotSupportedException
import java.sql.Statement

// extends statement implementing methods that are not supported by read only statements
interface ReadOnlyStatement : Statement {

  override fun execute(sql: String?,
                       autoGeneratedKeys: Int): Boolean = throw SQLFeatureNotSupportedException("Auto generated keys are not supported by Lenses")

  override fun execute(sql: String?,
                       columnIndexes: IntArray?): Boolean = throw SQLFeatureNotSupportedException("Auto generated keys are not supported by Lenses")

  override fun execute(sql: String?,
                       columnNames: Array?): Boolean = throw SQLFeatureNotSupportedException("Auto generated keys are not supported by Lenses")

  override fun addBatch(sql: String?) = throw SQLFeatureNotSupportedException()
  override fun executeUpdate(sql: String?, autoGeneratedKeys: Int): Int = throw SQLFeatureNotSupportedException()
  override fun executeUpdate(sql: String?, columnIndexes: IntArray?): Int = throw SQLFeatureNotSupportedException()
  override fun executeUpdate(sql: String?,
                             columnNames: Array?): Int = throw SQLFeatureNotSupportedException()

  override fun getUpdateCount(): Int = -1

  override fun clearBatch() = unsupported()
  override fun executeBatch(): IntArray = unsupported()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy