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

slick.jdbc.ResultSetConcurrency.scala Maven / Gradle / Ivy

There is a newer version: 3.3.3
Show newest version
package slick.jdbc

import java.sql.ResultSet

/** Represents a result set concurrency mode. */
sealed abstract class ResultSetConcurrency(val intValue: Int) { self =>
  /** Return this `ResultSetConcurrency`, unless it is `Auto` in which case
    * the specified concurrency mode is returned instead. */
  def withDefault(r: ResultSetConcurrency) = this
}

object ResultSetConcurrency {
  /** The current concurrency mode of the JDBC driver */
  case object Auto extends ResultSetConcurrency(ResultSet.CONCUR_READ_ONLY) {
    override def withDefault(r: ResultSetConcurrency) = r
  }

  /** The concurrency mode which indicates that the result set may not be updated. */
  case object ReadOnly extends ResultSetConcurrency(ResultSet.CONCUR_READ_ONLY)

  /** The concurrency mode which indicates that the result set may be updated. */
  case object Updatable extends ResultSetConcurrency(ResultSet.CONCUR_UPDATABLE)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy