How to pass byte array to StaticQuery.update ? (postgresql)

79 views
Skip to first unread message

RanUser

unread,
Feb 17, 2015, 3:47:10 AM2/17/15
to scala...@googlegroups.com
Hello,

Slick 2.1 w/ Postgresql 9.4 w/ latest driver

1. How to pass a byte array via StaticQuery.update ?
2. How to retrieve a byte array via StaticQuery.query ?

example update query (truncated to relevant part, it's a writable cte):

val u = StaticQuery.update[(Int, Int, Array[Byte])](]]("WITH new_values (id, name, data) as ( values (?, ?, ?) ), ... ")
db.withTransaction{ implicit s =>
u(id, name, byteArraydata).execute
}


[error] could not find implicit value for parameter pconv: scala.slick.jdbc.SetParameter[(Int, Int, Array[Byte])]
[error]     val u = StaticQuery.update[(Int, Int,Array[Byte])](sql)
[error]                                                       ^


Thank you!

Christopher Vogt

unread,
Feb 20, 2015, 12:54:50 PM2/20/15
to scala...@googlegroups.com
Try slick-pg and open a ticket there if it doesn't work.
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Slick / ScalaQuery" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to scalaquery+...@googlegroups.com
> <mailto:scalaquery+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/scalaquery/8f37c1ea-478f-4ce0-a6dd-a83da8fb38ca%40googlegroups.com
> <https://groups.google.com/d/msgid/scalaquery/8f37c1ea-478f-4ce0-a6dd-a83da8fb38ca%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages