Packages

  • package root

    edit this text on github Slick logo

    edit this text on github Slick logo

    Scala Language-Integrated Connection Kit

    This is the API documentation for the Slick database library. It should be used as an additional resource to the user manual.

    Further documentation for Slick can be found on the documentation pages.

    To the slick package list...

    Definition Classes
    root
  • package slick
    Definition Classes
    root
  • package jdbc

    Contains the abstract JdbcProfile and related code.

    Contains the abstract JdbcProfile and related code. This includes all JDBC-related code, facilities for Plain SQL queries, and JDBC-specific profile components.

    Definition Classes
    slick
  • trait MySQLProfile extends JdbcProfile with MultipleRowsPerStatementSupport

    Slick profile for MySQL.

    Slick profile for MySQL.

    This profile implements slick.jdbc.JdbcProfile without the following capabilities:

    Sequences are supported through an emulation which requires the schema to be created by Slick. You can also use an existing schema with your own sequence emulation if you provide for each sequence s a pair of functions s_nextval and s_currval.

    insertOrUpdate and insertOrUpdateAll use INSERT ... ON DUPLICATE KEY UPDATE, which MySQL applies to any unique key, not only the primary key. When the new row clashes with a different row on a unique non-key column, that other row is updated instead of the call failing, and since the update list includes the primary key columns (except AutoInc ones), it is given the new row's key. For a strict primary-key upsert, remove slick.jdbc.JdbcCapabilities.insertOrUpdate in a custom profile: insertOrUpdate then selects the row by primary key and runs an UPDATE or an INSERT, so a clash on another unique key fails with a duplicate-key error. insertOrUpdateAll is not supported without the capability.

    The default type for strings of unlimited length is "TEXT", falling back to "VARCHAR(254)" if a Default or PrimaryKey column option is set. This can be changed by overriding slick.jdbc.MySQLProfile.defaultStringType in application.conf.

    Note: Slick 3.2 also checks the old config path "slick.driver.MySQL" that was used by Slick 3.0 and 3.1, and logs a warning if anything is found there. Values from the old path are *not* used anymore. This deprecation warning will be removed in a future version.

    Definition Classes
    jdbc
  • class MySQLModelBuilder extends JdbcModelBuilder
    Definition Classes
    MySQLProfile
  • Builders
  • ColumnBuilder
  • ForeignKeyBuilder
  • IndexBuilder
  • MySQLColumnBuilder
  • MySQLPrimaryKeyBuilder
  • MySQLTableNamer
  • PrimaryKeyBuilder
  • TableBuilder
  • TableNamer

class MySQLPrimaryKeyBuilder extends PrimaryKeyBuilder

Source
MySQLProfile.scala
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MySQLPrimaryKeyBuilder
  2. PrimaryKeyBuilder
  3. AnyRef
  4. Any
Implicitly
  1. by StringFormat
  2. by Ensuring
  3. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new MySQLPrimaryKeyBuilder(tableBuilder: MySQLModelBuilder.TableBuilder, meta: Seq[MPrimaryKey])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def ->[B](y: B): (MySQLPrimaryKeyBuilder, B)
    Implicit
    This member is added by an implicit conversion from MySQLPrimaryKeyBuilder toArrowAssoc[MySQLPrimaryKeyBuilder] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. def columns: Seq[String]

    Names of the primary key columns in key sequence order

    Names of the primary key columns in key sequence order

    Definition Classes
    PrimaryKeyBuilder
  8. def enabled: Boolean

    Indicates wether a primary key should be generated.

    Indicates wether a primary key should be generated. Disabled by default for single column primary keys in favor of ColumnOption PrimaryKey via Column#createPrimaryKeyColumnOption.

    Definition Classes
    PrimaryKeyBuilder
  9. def ensuring(cond: (MySQLPrimaryKeyBuilder) => Boolean, msg: => Any): MySQLPrimaryKeyBuilder
    Implicit
    This member is added by an implicit conversion from MySQLPrimaryKeyBuilder toEnsuring[MySQLPrimaryKeyBuilder] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (MySQLPrimaryKeyBuilder) => Boolean): MySQLPrimaryKeyBuilder
    Implicit
    This member is added by an implicit conversion from MySQLPrimaryKeyBuilder toEnsuring[MySQLPrimaryKeyBuilder] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: => Any): MySQLPrimaryKeyBuilder
    Implicit
    This member is added by an implicit conversion from MySQLPrimaryKeyBuilder toEnsuring[MySQLPrimaryKeyBuilder] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): MySQLPrimaryKeyBuilder
    Implicit
    This member is added by an implicit conversion from MySQLPrimaryKeyBuilder toEnsuring[MySQLPrimaryKeyBuilder] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def model: Option[PrimaryKey]
    Definition Classes
    PrimaryKeyBuilder
  19. def name: Option[String]

    Primary key name, if the database reports one

    Primary key name, if the database reports one

    Definition Classes
    MySQLPrimaryKeyBuilder → PrimaryKeyBuilder
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from MySQLPrimaryKeyBuilder toStringFormat[MySQLPrimaryKeyBuilder] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def →[B](y: B): (MySQLPrimaryKeyBuilder, B)
    Implicit
    This member is added by an implicit conversion from MySQLPrimaryKeyBuilder toArrowAssoc[MySQLPrimaryKeyBuilder] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion StringFormat fromMySQLPrimaryKeyBuilder to StringFormat[MySQLPrimaryKeyBuilder]

Inherited by implicit conversion Ensuring fromMySQLPrimaryKeyBuilder to Ensuring[MySQLPrimaryKeyBuilder]

Inherited by implicit conversion ArrowAssoc fromMySQLPrimaryKeyBuilder to ArrowAssoc[MySQLPrimaryKeyBuilder]

Ungrouped