Packages

o

little.sql

Implicits

object Implicits

Provides implicits values and types.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Implicits
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit final class ConnectionType extends AnyVal

    Provides extension methods to java.sql.Connection.

    Provides extension methods to java.sql.Connection.

    import little.sql._
    import Implicits._
    
    val connector = Connector("jdbc:h2:~/test", "sa", "s3cr3t", "org.h2.Driver")
    
    connector.withConnection { conn ⇒
      val statements = Seq(
        "drop table prog_lang if exists",
        "create table prog_lang (id int, name text)",
        "insert into prog_lang (id, name) values (1, 'basic'), (2, 'pascal'), (3, 'c')",
        "select * from prog_lang"
      )
    
      statements.foreach { sql ⇒
        // Execute SQL and handle execution result accordingly
        conn.execute(sql) {
          // If update is executed print update count
          case Update(count) ⇒ println(s"Update Count: $count")
          // If query is executed print values of each row in ResultSet
          case Query(resultSet) ⇒
            while (resultSet.next())
              printf("id: %d, name: %s%n", resultSet.getInt("id"), resultSet.getString("name"))
        }
      }
    }
  2. implicit final class DataSourceType extends AnyVal

    Provides extension methods to javax.sql.DataSource.

  3. implicit final class PreparedStatementType extends AnyVal

    Provides extension methods to java.sql.PreparedStatement.

    Provides extension methods to java.sql.PreparedStatement.

    See also

    StatementType

  4. implicit final class ResultSetType extends AnyVal

    Provides extension methods to java.sql.ResultSet.

  5. implicit final class StatementType extends AnyVal

    Provides extension methods to java.sql.Statement.

    Provides extension methods to java.sql.Statement.

    See also

    PreparedStatementType

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. implicit def anyToInParam(value: Any): InParam

    Converts Any to InParam.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. implicit def bigDecimalToInParam(value: BigDecimal): InParam

    Converts BigDecimal to InParam.

  7. implicit def booleanToInParam(value: Boolean): InParam

    Converts Boolean to InParam.

  8. implicit def byteToInParam(value: Byte): InParam

    Converts Byte to InParam.

  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  10. implicit def dateToInParam(value: Date): InParam

    Converts Date to InParam.

  11. implicit def doubleToInParam(value: Double): InParam

    Converts Double to InParam.

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. implicit def floatToInParam(value: Float): InParam

    Converts Float to InParam.

  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. implicit def intToInParam(value: Int): InParam

    Converts Int to InParam.

  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. implicit def localDateTimeToInParam(value: LocalDateTime): InParam

    Converts LocalDateTime to InParam.

  21. implicit def localDateToInParam(value: LocalDate): InParam

    Converts LocalDate to InParam.

  22. implicit def localTimeToInParam(value: LocalTime): InParam

    Converts LocalTime to InParam.

  23. implicit def longToInParam(value: Long): InParam

    Converts Long to InParam.

  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. implicit def optionToInParam[T](value: Option[T])(implicit toInParam: (T) ⇒ InParam): InParam

    Converts Option[T] to InParam.

  28. implicit def seqToInParams[T](values: Seq[T])(implicit toInParam: (T) ⇒ InParam): Seq[InParam]

    Converts Seq[T] to Seq[InParam].

  29. implicit def shortToInParam(value: Short): InParam

    Converts Short to InParam.

  30. implicit def stringToInParam(value: String): InParam

    Converts String to InParam.

  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. implicit def timeToInParam(value: Time): InParam

    Converts Time to InParam.

  33. implicit def timestampToInParam(value: Timestamp): InParam

    Converts Timestamp to InParam.

  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  38. implicit object GetBigDecimal extends GetValue[BigDecimal]

    Gets BigDecimal from ResultSet.

  39. implicit object GetBoolean extends GetValue[Boolean]

    Gets Boolean from ResultSet.

  40. implicit object GetByte extends GetValue[Byte]

    Gets Byte from ResultSet.

  41. implicit object GetDate extends GetValue[Date]

    Gets Date from ResultSet.

  42. implicit object GetDouble extends GetValue[Double]

    Gets Double from ResultSet.

  43. implicit object GetFloat extends GetValue[Float]

    Gets Float from ResultSet.

  44. implicit object GetInt extends GetValue[Int]

    Gets Int from ResultSet.

  45. implicit object GetLocalDate extends GetValue[LocalDate]

    Gets LocalDate from ResultSet.

  46. implicit object GetLocalDateTime extends GetValue[LocalDateTime]

    Gets LocalDateTime from ResultSet.

  47. implicit object GetLocalTime extends GetValue[LocalTime]

    Gets LocalTime from ResultSet.

  48. implicit object GetLong extends GetValue[Long]

    Gets Long from ResultSet.

  49. implicit object GetShort extends GetValue[Short]

    Gets Short from ResultSet.

  50. implicit object GetString extends GetValue[String]

    Gets String from ResultSet.

  51. implicit object GetTime extends GetValue[Time]

    Gets Time from ResultSet.

  52. implicit object GetTimestamp extends GetValue[Timestamp]

    Gets Timestamp from ResultSet.

Inherited from AnyRef

Inherited from Any

Ungrouped