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

oriana.DatabaseName.scala Maven / Gradle / Ivy

Go to download

Oriana is a small layer on top of slick that allows easier access to the database. It allows peudo-syntactic methods to inject a database context into arbitrary code, and simplifies deployment, updates and initialization.

The newest version!
package oriana

import akka.actor.{ActorPath, ActorRef}

/**
  * Wrapper type representing a database name. The name is supposed to be the
  * actor name of the database actor.
  *
  * @param name name of the actor
  */
case class DatabaseName(val name: String) extends AnyVal

object DatabaseName {
  /**
    * The default database - named (unimaginatively enough) "database"
    */
  implicit val default = DatabaseName("/user/database")

  /**
    * Derives an database name from an actor path
    * @param path actor path
    * @return path, as a database name
    */
  def apply(path: ActorPath): DatabaseName = DatabaseName(path.toStringWithoutAddress)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy