Commit 71957bc9 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Put back type changes

parent caf71f04
......@@ -17,7 +17,6 @@ package nl.lumc.sasc.biopet.utils.summary.db
import java.sql.Date
import slick.driver.H2Driver.api._
import slick.lifted.{Index, MappedProjection}
/**
* Created by pjvan_thof on 27-1-17.
......@@ -31,73 +30,69 @@ object Schema {
commitHash: String,
creationDate: Date)
class Runs(tag: Tag) extends Table[Run](tag, "Runs") {
def id: Rep[Int] = column[Int]("id", O.PrimaryKey)
def runName: Rep[String] = column[String]("runName")
def outputDir: Rep[String] = column[String]("outputDir")
def version: Rep[String] = column[String]("version")
def commitHash: Rep[String] = column[String]("commitHash")
def creationDate: Rep[Date] = column[Date]("creationDate")
def * : MappedProjection[Run, (Int, String, String, String, String, Date)] =
def id = column[Int]("id", O.PrimaryKey)
def runName = column[String]("runName")
def outputDir = column[String]("outputDir")
def version = column[String]("version")
def commitHash = column[String]("commitHash")
def creationDate = column[Date]("creationDate")
def * =
(id, runName, outputDir, version, commitHash, creationDate) <> (Run.tupled, Run.unapply)
}
val runs: TableQuery[Runs] = TableQuery[Runs]
val runs = TableQuery[Runs]
case class Sample(id: Int, name: String, runId: Int, tags: Option[String])
class Samples(tag: Tag) extends Table[Sample](tag, "Samples") {
def id: Rep[Int] = column[Int]("id", O.PrimaryKey)
def name: Rep[String] = column[String]("name")
def runId: Rep[Int] = column[Int]("runId")
def tags: Rep[Option[String]] = column[Option[String]]("tags")
def id = column[Int]("id", O.PrimaryKey)
def name = column[String]("name")
def runId = column[Int]("runId")
def tags = column[Option[String]]("tags")
def * : MappedProjection[Sample, (Int, String, Int, Option[String])] =
(id, name, runId, tags) <> (Sample.tupled, Sample.unapply)
def * = (id, name, runId, tags) <> (Sample.tupled, Sample.unapply)
def idx: Index = index("idx_samples", (runId, name), unique = true)
def idx = index("idx_samples", (runId, name), unique = true)
}
val samples: TableQuery[Samples] = TableQuery[Samples]
val samples = TableQuery[Samples]
case class Library(id: Int, name: String, runId: Int, sampleId: Int, tags: Option[String])
class Libraries(tag: Tag) extends Table[Library](tag, "Libraries") {
def id: Rep[Int] = column[Int]("id", O.PrimaryKey)
def name: Rep[String] = column[String]("name")
def runId: Rep[Int] = column[Int]("runId")
def sampleId: Rep[Int] = column[Int]("sampleId")
def tags: Rep[Option[String]] = column[Option[String]]("tags")
def id = column[Int]("id", O.PrimaryKey)
def name = column[String]("name")
def runId = column[Int]("runId")
def sampleId = column[Int]("sampleId")
def tags = column[Option[String]]("tags")
def * : MappedProjection[Library, (Int, String, Int, Int, Option[String])] =
(id, name, runId, sampleId, tags) <> (Library.tupled, Library.unapply)
def * = (id, name, runId, sampleId, tags) <> (Library.tupled, Library.unapply)
def idx: Index = index("idx_libraries", (runId, sampleId, name), unique = true)
def idx = index("idx_libraries", (runId, sampleId, name), unique = true)
}
val libraries: TableQuery[Libraries] = TableQuery[Libraries]
val libraries = TableQuery[Libraries]
case class Pipeline(id: Int, name: String, runId: Int)
class Pipelines(tag: Tag) extends Table[Pipeline](tag, "PipelineNames") {
def id: Rep[Int] = column[Int]("id", O.PrimaryKey)
def name: Rep[String] = column[String]("name")
def runId: Rep[Int] = column[Int]("runId")
def id = column[Int]("id", O.PrimaryKey)
def name = column[String]("name")
def runId = column[Int]("runId")
def * : MappedProjection[Pipeline, (Int, String, Int)] =
(id, name, runId) <> (Pipeline.tupled, Pipeline.unapply)
def * = (id, name, runId) <> (Pipeline.tupled, Pipeline.unapply)
def idx: Index = index("idx_pipeline_names", (name, runId), unique = true)
def idx = index("idx_pipeline_names", (name, runId), unique = true)
}
val pipelines: TableQuery[Pipelines] = TableQuery[Pipelines]
val pipelines = TableQuery[Pipelines]
case class Module(id: Int, name: String, runId: Int, pipelineId: Int)
class Modules(tag: Tag) extends Table[Module](tag, "ModuleNames") {
def id: Rep[Int] = column[Int]("id", O.PrimaryKey)
def name: Rep[String] = column[String]("name")
def runId: Rep[Int] = column[Int]("runId")
def pipelineId: Rep[Int] = column[Int]("pipelineId")
def id = column[Int]("id", O.PrimaryKey)
def name = column[String]("name")
def runId = column[Int]("runId")
def pipelineId = column[Int]("pipelineId")
def * : MappedProjection[Module, (Int, String, Int, Int)] =
(id, name, runId, pipelineId) <> (Module.tupled, Module.unapply)
def * = (id, name, runId, pipelineId) <> (Module.tupled, Module.unapply)
def idx: Index = index("idx_module_names", (name, runId, pipelineId), unique = true)
def idx = index("idx_module_names", (name, runId, pipelineId), unique = true)
}
val modules: TableQuery[Modules] = TableQuery[Modules]
val modules = TableQuery[Modules]
case class Stat(runId: Int,
pipelineId: Int,
......@@ -106,20 +101,19 @@ object Schema {
library: Option[Int],
content: String)
class Stats(tag: Tag) extends Table[Stat](tag, "Stats") {
def runId: Rep[Int] = column[Int]("runId")
def pipelineId: Rep[Int] = column[Int]("pipelineId")
def moduleId: Rep[Option[Int]] = column[Option[Int]]("moduleId")
def sampleId: Rep[Option[Int]] = column[Option[Int]]("sampleId")
def libraryId: Rep[Option[Int]] = column[Option[Int]]("libraryId")
def content: Rep[String] = column[String]("content")
def * : MappedProjection[Stat, (Int, Int, Option[Int], Option[Int], Option[Int], String)] =
def runId = column[Int]("runId")
def pipelineId = column[Int]("pipelineId")
def moduleId = column[Option[Int]]("moduleId")
def sampleId = column[Option[Int]]("sampleId")
def libraryId = column[Option[Int]]("libraryId")
def content = column[String]("content")
def * =
(runId, pipelineId, moduleId, sampleId, libraryId, content) <> (Stat.tupled, Stat.unapply)
def idx: Index =
index("idx_stats", (runId, pipelineId, moduleId, sampleId, libraryId), unique = true)
def idx = index("idx_stats", (runId, pipelineId, moduleId, sampleId, libraryId), unique = true)
}
val stats: TableQuery[Stats] = TableQuery[Stats]
val stats = TableQuery[Stats]
case class Setting(runId: Int,
pipelineId: Int,
......@@ -128,20 +122,20 @@ object Schema {
library: Option[Int],
content: String)
class Settings(tag: Tag) extends Table[Setting](tag, "Settings") {
def runId: Rep[Int] = column[Int]("runId")
def pipelineId: Rep[Int] = column[Int]("pipelineId")
def moduleId: Rep[Option[Int]] = column[Option[Int]]("moduleId")
def sampleId: Rep[Option[Int]] = column[Option[Int]]("sampleId")
def libraryId: Rep[Option[Int]] = column[Option[Int]]("libraryId")
def content: Rep[String] = column[String]("content")
def * : MappedProjection[Setting, (Int, Int, Option[Int], Option[Int], Option[Int], String)] =
def runId = column[Int]("runId")
def pipelineId = column[Int]("pipelineId")
def moduleId = column[Option[Int]]("moduleId")
def sampleId = column[Option[Int]]("sampleId")
def libraryId = column[Option[Int]]("libraryId")
def content = column[String]("content")
def * =
(runId, pipelineId, moduleId, sampleId, libraryId, content) <> (Setting.tupled, Setting.unapply)
def idx: Index =
def idx =
index("idx_settings", (runId, pipelineId, moduleId, sampleId, libraryId), unique = true)
}
val settings: TableQuery[Settings] = TableQuery[Settings]
val settings = TableQuery[Settings]
case class File(runId: Int,
pipelineId: Int,
......@@ -154,26 +148,24 @@ object Schema {
link: Boolean,
size: Long)
class Files(tag: Tag) extends Table[File](tag, "Files") {
def runId: Rep[Int] = column[Int]("runId")
def pipelineId: Rep[Int] = column[Int]("pipelineId")
def moduleId: Rep[Option[Int]] = column[Option[Int]]("moduleId")
def sampleId: Rep[Option[Int]] = column[Option[Int]]("sampleId")
def libraryId: Rep[Option[Int]] = column[Option[Int]]("libraryId")
def key: Rep[String] = column[String]("key")
def path: Rep[String] = column[String]("path") // This should be relative to the outputDir
def md5: Rep[String] = column[String]("md5")
def link: Rep[Boolean] = column[Boolean]("link", O.Default(false))
def size: Rep[Long] = column[Long]("size")
def * : MappedProjection[
File,
(Int, Int, Option[Int], Option[Int], Option[Int], String, String, String, Boolean, Long)] =
def runId = column[Int]("runId")
def pipelineId = column[Int]("pipelineId")
def moduleId = column[Option[Int]]("moduleId")
def sampleId = column[Option[Int]]("sampleId")
def libraryId = column[Option[Int]]("libraryId")
def key = column[String]("key")
def path = column[String]("path") // This should be relative to the outputDir
def md5 = column[String]("md5")
def link = column[Boolean]("link", O.Default(false))
def size = column[Long]("size")
def * =
(runId, pipelineId, moduleId, sampleId, libraryId, key, path, md5, link, size) <> (File.tupled, File.unapply)
def idx: Index =
def idx =
index("idx_files", (runId, pipelineId, moduleId, sampleId, libraryId, key), unique = true)
}
val files: TableQuery[Files] = TableQuery[Files]
val files = TableQuery[Files]
case class Executable(runId: Int,
toolName: String,
......@@ -184,28 +176,20 @@ object Schema {
javaMd5: Option[String] = None,
jarPath: Option[String] = None)
class Executables(tag: Tag) extends Table[Executable](tag, "Executables") {
def runId: Rep[Int] = column[Int]("runId")
def toolName: Rep[String] = column[String]("toolName")
def version: Rep[Option[String]] = column[Option[String]]("version")
def path: Rep[Option[String]] = column[Option[String]]("path")
def javaVersion: Rep[Option[String]] = column[Option[String]]("javaVersion")
def exeMd5: Rep[Option[String]] = column[Option[String]]("exeMd5")
def javaMd5: Rep[Option[String]] = column[Option[String]]("javaMd5")
def jarPath: Rep[Option[String]] = column[Option[String]]("jarPath")
def * : MappedProjection[Executable,
(Int,
String,
Option[String],
Option[String],
Option[String],
Option[String],
Option[String],
Option[String])] =
def runId = column[Int]("runId")
def toolName = column[String]("toolName")
def version = column[Option[String]]("version")
def path = column[Option[String]]("path")
def javaVersion = column[Option[String]]("javaVersion")
def exeMd5 = column[Option[String]]("exeMd5")
def javaMd5 = column[Option[String]]("javaMd5")
def jarPath = column[Option[String]]("jarPath")
def * =
(runId, toolName, version, path, javaVersion, exeMd5, javaMd5, jarPath) <> (Executable.tupled, Executable.unapply)
def idx: Index = index("idx_executables", (runId, toolName), unique = true)
def idx = index("idx_executables", (runId, toolName), unique = true)
}
val executables: TableQuery[Executables] = TableQuery[Executables]
val executables = TableQuery[Executables]
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment