public
Last active

SO13885423

  • Download Gist
README.md
Markdown

SO13885423

Produces: type mismatch; found : (Int, Int) required: (Int, Int) SO13885423.scala ... line 19

SO13885423.scala
Scala
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
package so
 
import org.scalaquery.session._
import org.scalaquery.ql.basic.{ BasicTable => Table }
import org.scalaquery.ql.TypeMapper._
import org.scalaquery.ql._
import org.scalaquery.ql.basic.BasicDriver.Implicit._
 
object M extends Table[(Int, Int)]("M") {
 
def id = column[Int]("id")
def n = column[Int]("n")
def * = id ~ n
type T = (Int, Int)
 
def apply(v: T) = 1
 
def main(args: Array[String]): Unit = {
DB.db withSession { s: Session => (for (r <- M) yield M(*)).list()(s) }
}
 
}
build.sbt
Scala
1 2 3 4 5 6 7 8 9 10 11 12 13
name := "so"
 
version := "1.0"
 
scalaVersion := "2.9.2"
 
resolvers ++= Seq(
"scalaquery" at "http://scala-tools.org/repo-releases"
)
 
libraryDependencies ++= Seq(
"org.scalaquery" % "scalaquery_2.9.1-1" % "0.10.0-M1"
)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.