Skip to content

Integrate the four official Activator templates into the manual.#1711

Merged
szeiger merged 2 commits intoslick:3.2from
szeiger:tmp/insource-templates
Apr 3, 2017
Merged

Integrate the four official Activator templates into the manual.#1711
szeiger merged 2 commits intoslick:3.2from
szeiger:tmp/insource-templates

Conversation

@szeiger
Copy link
Copy Markdown
Member

@szeiger szeiger commented Mar 24, 2017

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.

szeiger added 2 commits March 23, 2017 21:17
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.
Copy link
Copy Markdown
Contributor

@d6y d6y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread doc/src/gettingstarted.md

This produces a database I/O action that can be run or streamed in the usual way.

### Case Class Mapping
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably this code could be switched to mapTo

@nafg
Copy link
Copy Markdown
Member

nafg commented Jul 28, 2017

http://slick.lightbend.com/doc/3.2.1/testkit.html has broken activator links, not sure if this was supposed to fix (eliminate) them

@jbarros35
Copy link
Copy Markdown

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.
that approach is very hard for new comers.

@LtDan33
Copy link
Copy Markdown

LtDan33 commented Jan 9, 2018

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.

@pmbittner
Copy link
Copy Markdown

pmbittner commented Dec 8, 2020

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
https://github.com/slick/slick-examples
to
https://scala-slick.org/docs/
to
https://github.com/typesafehub?q=activator-slick
and then clicked on the repository activator-hello-slick because it seemed like the most simple example which sent me to
https://github.com/typesafehub/activator-hello-slick
which sent me to
exactly this pull-request.

I cannot find any examples in the comments of this pull-request.
I am a user of your library that just wants to setup a simple database.
I dont want to dig into your devlogs to find some documention.

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?

@PAStheLoD
Copy link
Copy Markdown

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. :/

@pmbittner
Copy link
Copy Markdown

Hi @PAStheLoD,

Thank you very much for the fast help!
This is exactly what I was looking for. :)
Hope this will also help others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants