I tried to add column based on example [slick-pg example][1]
Also added to the class table implicite
implicit val pointFormat = MyFormats.geometryFormat[Point]
but have a compile error
could not find implicit value for parameter tt: slick.ast.TypedType[com.vividsolutions.jts.geom.Point]
What I have done wrong? could you please give work example ? ^
BR!
What I have working for me is something in the following setup:
First, my table declaration:
I need to extensions: java8 time support (LocalDateTime) and geo stuff (Point). This is reflected in my
build.sbt
- I use version 0.11.0 for slick-pg:Now, the driver declaration:
So, take the java 8 time stuff. You can notice that the driver uses
PgDate2Support
, which then allows me the usage of the implicitDateTimeImplicits
. By importing theExtendedPostgresDriver.api._
in my class of interest, I can then have the table definition use theLocalDateTime
type that I need.Same thing for
Point
:PgPostGISSupport
->PostGISImplicits
->Point
.Hope this helps