This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This method works but it is verbose and is specific to the firstNames column | |
def updatePD_FirstNames(id: ids.PersonalDetailsId, firstNames: StringLtd30): Future[Int] = { | |
val q1: Query[tables.PersonalDetails, PersonalDetailsRow, Seq] = for { | |
row: tables.PersonalDetails <- tables.PersonalDetails if row.id === id | |
} yield { | |
row | |
} | |
//This mapper can instead be put into the parameter list. That works and is what I have done in updatePD_SL, on line 19 below. | |
val mapper: tables.PersonalDetails => tables.profile.api.Rep[StringLtd30] = (pdTable: tables.PersonalDetails) => { | |
val r: tables.profile.api.Rep[StringLtd30] = pdTable.firstNames |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Editor[T](initialValue: T) | |
class A[F, E <: Editor[F]](fieldMaker: () => F, edMaker: F => E) { | |
val field: F = fieldMaker() | |
val editor: E = edMaker(field) | |
} | |
locally { //Long | |
class B(opStringTypeMaker: () => (Option[String])) | |
extends A[Option[String], Editor[Option[String]]](opStringTypeMaker, opS => new Editor(opS)) { | |
} | |
val b = new B(() => Some("First")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright Marc J. Schmidt. See the LICENSE file at the top-level | |
* directory of this distribution and at | |
* https://github.com/marcj/css-element-queries/blob/master/LICENSE. | |
*/ | |
; | |
(function (root, factory) { | |
if (typeof define === "function" && define.amd) { | |
define(factory); | |
} else if (typeof exports === "object") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Workspace\IdeaProjects\prescalajs>sbt run | |
[info] Loading project definition from C:\Workspace\IdeaProjects\prescalajs\project | |
[info] Set current project to vintur (in build file:/C:/Workspace/IdeaProjects/prescalajs/) | |
[info] Updating {file:/C:/Workspace/IdeaProjects/prescalajs/}vintur... | |
[info] Resolving jline#jline;2.12.1 ... | |
[info] Done updating. | |
--- (Running the application, auto-reloading is enabled) --- | |
[info] p.a.l.c.ActorSystemProvider - Starting application default Akka system: application |