This file contains hidden or 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
package com.foundationdb.slick.driver | |
import java.sql.{PreparedStatement, ResultSet} | |
import java.util.UUID | |
import scala.slick.ast._ | |
import scala.slick.lifted._ | |
import scala.slick.driver.JdbcDriver | |
import scala.slick.jdbc.JdbcType | |
import scala.slick.jdbc.meta.MTable | |
import scala.slick.model.Model |
This file contains hidden or 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
trait ID | |
case class SequentialID(id: Int) extends ID | |
case class OtherID(id: Int) extends ID | |
case class User(val id: ID, val b: Int, val c: Int) | |
object UserId { | |
def unapply(w: User) = w match { | |
case u @ User(SequentialID(id), _, _) => Some(u, id) |
This file contains hidden or 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
Rehearsal ------------------------------------------------------------- | |
INSERTION STATIC : Tree 0.334000 0.000000 0.334000 ( 0.334000) | |
INSERTION STATIC : Regexp 0.244000 0.000000 0.244000 ( 0.244000) | |
MATCHING STATIC : Tree 1.297000 0.000000 1.297000 ( 1.297000) | |
MATCHING STATIC : Regexp 13.382000 0.000000 13.382000 ( 13.382000) | |
--------------------------------------------------- total: 15.257000sec | |
user system total real | |
INSERTION STATIC : Tree 0.045000 0.000000 0.045000 ( 0.045000) | |
INSERTION STATIC : Regexp 0.106000 0.000000 0.106000 ( 0.106000) |