Integrate the four official Activator templates into the manual.#1711
Integrate the four official Activator templates into the manual.#1711
Conversation
A custom ClassLoader (or Slick’s own default ClassLoader) was used for resolving driver or connection pool classes but not for the default application config (via Typesafe Config). This relied on Typesafe Config’s own default ClassLoder which does not work properly from a macro when compiling in sbt.
We can use Lightbend’s Example Code Service to make pre-packaged zip files available for download. We need to move away from Activator because it will be shut down soon. I updated the sample code for 3.2 and tried to integrate the tutorials back into the manual. Some more polishing could be done in order to retire FirstExample.scala and PlainSQL.scala from doc/code and take all snippets on gettingstarted.md and sql.md from the sample projects.
There was a problem hiding this comment.
Great stuff! Wonderful to see mapTo appearing 👍
In reviewing the changes, I spotted a couple of things I wanted to capture somewhere. They are not directly touched in the PR (sorry!)....feel free to ignore in this PR.
Mapped Tables
In schema.md there's a section on Mapped Tables which introduces <>. Suggest highlighting mapTo instead, and prefacing the <> discussion with a comment along the lines of "if you need more control over the mappoing, <> allows you to..."
Object Math
I noticed introduction.md contains the line:
Functional programmers have long suffered Object-Relational and Object-Math impedance mismatches
The term "Object-Math" is not one I've seen. Wondering if it is a typo or some kind of algebra reference. Or something else.
|
|
||
| This produces a database I/O action that can be run or streamed in the usual way. | ||
|
|
||
| ### Case Class Mapping |
There was a problem hiding this comment.
Suggest added mapTo into the index around here.
{index="mapTo"}
something like that?
| class Pictures(tag: Tag) extends Table[Picture](tag, "PICTURES") { | ||
| def id = column[Option[Int]]("PIC_ID", O.PrimaryKey, O.AutoInc) | ||
| def url = column[String]("PIC_URL") | ||
| def * = (url, id) <> (Picture.tupled, Picture.unapply) |
There was a problem hiding this comment.
Presumably this code could be switched to mapTo
|
http://slick.lightbend.com/doc/3.2.1/testkit.html has broken activator links, not sure if this was supposed to fix (eliminate) them |
|
the way you guys works, it can be very disruptive. when you destroy previous samples like 1.0 to 2.0 and to 3.0 we can't understand exactly how to migrate to newer versions. |
|
I'm really confused. Where are the updated tutorials? Activator isn't supported any more so where is the info to use Giter8? Using activator there are a lot of dependencies that can't even be found. |
|
Hello Slick-Team. I followed a redirect chain of links sending me here to find some examples on how to use slick. I was redirected from I cannot find any examples in the comments of this pull-request. Also I would really appreciate to find a link to the API of the current slick version (3.x.x) on your doucmentation website (https://scala-slick.org/docs/) instead of the API for Slick version 1.0.0. Or is this the version number (1.0.0) of the API docs and not the slick version covered in these docs? |
|
Hello @pmbittner ! As of now example code lives in the samples/ directory: https://github.com/slick/slick/tree/f81a69c798b76bb44e16045abddbd9c8922f5f64/samples The API docs for 3.3.2 are available at https://scala-slick.org/doc/3.3.2/api/index.html . Unfortunately the slick project is a bit under-funded / under-maintained. Like many FOSS projects it needs maintainers/patches/PRs. :/ |
|
Hi @PAStheLoD, Thank you very much for the fast help! |
We can use Lightbend’s Example Code Service to make pre-packaged zip
files available for download. We need to move away from Activator
because it will be shut down soon.
I updated the sample code for 3.2 and tried to integrate the tutorials
back into the manual. Some more polishing could be done in order to
retire FirstExample.scala and PlainSQL.scala from doc/code and take
all snippets on gettingstarted.md and sql.md from the sample projects.