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
package scala.slick.test.lifted | |
import com.typesafe.slick.testkit.util.ShouldNotTypecheck | |
class NegativeCompilationTests { | |
def noColumnBaseToOptionConversion = ShouldNotTypecheck(""" | |
class FooBarBlub extends String | |
""", "illegal inheritance from final class String") | |
} |
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
#!/bin/bash | |
function isIdeaProject() { | |
dirn=`dirname "$1"` | |
if [ "$dirn" = "/" ]; then | |
false | |
elif [ -d "$dirn/.idea" ]; then | |
true | |
else | |
isIdeaProject "$dirn" |
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
package foo.bar.baz | |
class DivergenceTest { | |
trait ColumnBase[T] | |
trait ShapeLevel | |
trait Flat extends ShapeLevel | |
class Shape2[Level <: ShapeLevel, -M, U] |
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
def testIssue146 { | |
case class Record(id: Int, text: String, categoryId: Int) | |
case class Category(id: Int, name: String, toolId: Int) | |
case class Tool(id: Int, name: String) | |
class RecordTable(tag: Tag) extends Table[Record](tag, "RECORDS") { | |
def id = column[Int]("id", O.PrimaryKey) | |
def text = column[String]("text") | |
def categoryId = column[Int]("category_id") |
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
trait Foo[X] | |
object Foo extends EImplicits | |
trait Bar[X] | |
object Bar extends EImplicits | |
trait E[X] | |
trait EImplicits extends EImplicitsLowPrio { | |
implicit final def fooEvidence[T : E]: E[Foo[T]] = null |
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
def testSimpleActionAsAction = { | |
class T(tag: Tag) extends Table[Int](tag, u"t") { | |
def a = column[Int]("a") | |
def * = a | |
} | |
val ts = TableQuery[T] | |
for { | |
_ <- ts.schema.create | |
_ <- ts ++= Seq(2, 3, 1, 5, 4) |
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
for { | |
_ <- actions( | |
(suppliersStd.schema ++ coffeesStd.schema).create, | |
suppliersStd += (101, "Acme, Inc.", "99 Market Street", "Groundsville", "CA", "95199"), | |
suppliersStd += ( 49, "Superior Coffee", "1 Party Place", "Mendocino", "CA", "95460"), | |
suppliersStd += (150, "The High Ground", "100 Coffee Lane", "Meadows", "CA", "93966"), | |
coffeesStd ++= Seq( | |
("Colombian", 101, 799, 1, 0), | |
("French_Roast", 49, 799, 2, 0), | |
("Espresso", 150, 999, 3, 0), |
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
val setup = seq( | |
(suppliersStd.schema ++ coffeesStd.schema).create, | |
suppliersStd += (101, "Acme, Inc.", "99 Market Street", "Groundsville", "CA", "95199"), | |
suppliersStd += ( 49, "Superior Coffee", "1 Party Place", "Mendocino", "CA", "95460"), | |
suppliersStd += (150, "The High Ground", "100 Coffee Lane", "Meadows", "CA", "93966"), | |
coffeesStd ++= Seq( | |
("Colombian", 101, 799, 1, 0), | |
("French_Roast", 49, 799, 2, 0), | |
("Espresso", 150, 999, 3, 0), | |
("Colombian_Decaf", 101, 849, 4, 0), |
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
package scala.slick.benchmark | |
import java.util.concurrent.atomic.AtomicLong | |
object MemBarrierBench extends App { | |
trait Subscr[T] { | |
def onNext(v: T): Unit | |
} |
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
buildCapabilitiesTable := { | |
val logger = ConsoleLogger() | |
Run.executeTrapExit({ | |
System.err.println("1") | |
Run.run( "com.typesafe.slick.testkit.util.BuildCapabilitiesTable", | |
(fullClasspath in Compile).value.map(_.data), | |
Seq("src/sphinx/capabilities.csv"), | |
logger)(runner.value) | |
System.err.println("2") | |
}, logger) |