Packages

t

org.bitcoins.chain.db

ChainDbManagement

trait ChainDbManagement extends DbManagement

Responsible for creating and destroying database tables inside of the Chain project.

Self Type
ChainDbManagement with JdbcProfileComponent[ChainAppConfig]
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ChainDbManagement
  2. DbManagement
  3. BitcoinSLogger
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def ec: ExecutionContext

Concrete 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. lazy val allTables: List[slick.jdbc.JdbcProfile.JdbcAPI.TableQuery[slick.jdbc.JdbcProfile.JdbcAPI.Table[_]]]
    Definition Classes
    ChainDbManagementDbManagement
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clean(): CleanResult

    Runs flyway clean

    Runs flyway clean

    WARNING: THIS DELETES ALL DATA IN THE DATABASE, YOU PROBABLY DON'T WANT THIS UNLESS YOU ARE USING TESTS

    Definition Classes
    DbManagement
    See also

    https://flywaydb.org/documentation/command/clean

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. def createSchema(createIfNotExists: Boolean = true)(implicit ec: ExecutionContext): Future[Unit]
    Definition Classes
    DbManagement
  9. def createTable(table: slick.jdbc.JdbcProfile.JdbcAPI.TableQuery[_ <: slick.jdbc.JdbcProfile.JdbcAPI.Table[_]], createIfNotExists: Boolean = true)(implicit ec: ExecutionContext): Future[Unit]

    Creates the given table

    Creates the given table

    Definition Classes
    DbManagement
  10. def dropAll()(implicit ec: ExecutionContext): Future[Unit]
    Definition Classes
    DbManagement
  11. def dropTable(tableName: String)(implicit ec: ExecutionContext): Future[Int]
    Definition Classes
    DbManagement
  12. def dropTable(table: slick.jdbc.JdbcProfile.JdbcAPI.TableQuery[slick.jdbc.JdbcProfile.JdbcAPI.Table[_]]): Future[Unit]
    Definition Classes
    DbManagement
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  16. lazy val flyway: Flyway
    Attributes
    protected
    Definition Classes
    DbManagement
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def info(): MigrationInfoService

    Returns flyway information about the state of migrations

    Returns flyway information about the state of migrations

    Definition Classes
    DbManagement
    See also

    https://flywaydb.org/documentation/command/info

  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def logger: Logger
    Definition Classes
    BitcoinSLogger
  22. def migrate(): MigrateResult

    Executes migrations related to this database

    Executes migrations related to this database

    Definition Classes
    DbManagement
    See also

    https://flywaydb.org/documentation/api/#programmatic-configuration-java

  23. def migrationsApplied(): Int
    Definition Classes
    DbManagement
  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. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. implicit def tableQueryToWithSchema(tableQuery: slick.jdbc.JdbcProfile.JdbcAPI.TableQuery[_]): slick.jdbc.JdbcProfile.JdbcAPI.TableQuery[slick.jdbc.JdbcProfile.JdbcAPI.Table[_]]

    Internally, slick defines the schema member as

    Internally, slick defines the schema member as

    def schema: SchemaDescription = buildTableSchemaDescription(q.shaped.value.asInstanceOf[Table[_]])

    we need to cast between TableQuery's of specific table types to the more generic TableQuery[Table[_]] to get methods in this trait working as they require schema (which essentially does this cast anyway)

    This cast is needed because TableQuery is not covariant in its type parameter. However, since Query is covariant in its first type parameter, I believe the cast from TableQuery[T1] to TableQuery[T2] will always be safe so long as T1 is a subtype of T2 AND T1#TableElementType is equal to T2#TableElementType.

    The above conditions are always the case when this is called in the current code base and will stay that way so long as no one tries anything too fancy.

    Attributes
    protected
    Definition Classes
    DbManagement
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from DbManagement

Inherited from BitcoinSLogger

Inherited from AnyRef

Inherited from Any

Ungrouped