SELECT Blob or BYTEA from Plain SQL in 3.0.0

30 vistas
Ir al primer mensaje no leído

j.barrett Strausser

no leída,
1 jul 2015, 7:50:57 a.m.1/7/15
para scala...@googlegroups.com
This is my first experience with 3.0 and BLOBS/BYTEA. I am simply trying to Select a blob (or bytea) column and am receving an implicits error.



import slick.driver.PostgresDriver.api._
import slick.jdbc.JdbcBackend.Database
import scala.concurrent.Await import scala.concurrent.duration._

import scala.concurrent.ExecutionContext.Implicits.global
object QueryRunner extends  App {
val db = Database.forURL("jdbc:postgresql://localhost:5432/test","test_migration","test_migration",driver = "org.postgresql.Driver")

def selectRegions = sql"Select region_data from test.regions".as[java.sql.Blob]
val result = db.run(selectRegions)
val regionData = Await.result(result,1.seconds)}


That returns me

Error:(16, 65) could not find implicit value for parameter rconv: slick.jdbc.GetResult[java.sql.Blob] def selectRegions = sql"Select region_data from core.regions".as[java.sql.Blob]



I feel as though since Blob and BYTEA are somewhat specialized that I must be missing an import?



Also asked at :http://stackoverflow.com/questions/31152058/blob-or-bytea-from-plain-sql-query-in-slick-3-0-0

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos