atlassian-connect-play-slick

Atlassian Connect Play Slick

License

License

GroupId

GroupId

io.toolsplus
ArtifactId

ArtifactId

atlassian-connect-play-slick_2.11
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

atlassian-connect-play-slick
Atlassian Connect Play Slick
Project URL

Project URL

https://github.com/toolsplus/atlassian-connect-play-slick
Project Organization

Project Organization

io.toolsplus
Source Code Management

Source Code Management

https://github.com/toolsplus/atlassian-connect-play-slick

Download atlassian-connect-play-slick_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/io.toolsplus/atlassian-connect-play-slick_2.11/ -->
<dependency>
    <groupId>io.toolsplus</groupId>
    <artifactId>atlassian-connect-play-slick_2.11</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/io.toolsplus/atlassian-connect-play-slick_2.11/
implementation 'io.toolsplus:atlassian-connect-play-slick_2.11:0.0.1'
// https://jarcasting.com/artifacts/io.toolsplus/atlassian-connect-play-slick_2.11/
implementation ("io.toolsplus:atlassian-connect-play-slick_2.11:0.0.1")
'io.toolsplus:atlassian-connect-play-slick_2.11:jar:0.0.1'
<dependency org="io.toolsplus" name="atlassian-connect-play-slick_2.11" rev="0.0.1">
  <artifact name="atlassian-connect-play-slick_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.toolsplus', module='atlassian-connect-play-slick_2.11', version='0.0.1')
)
libraryDependencies += "io.toolsplus" % "atlassian-connect-play-slick_2.11" % "0.0.1"
[io.toolsplus/atlassian-connect-play-slick_2.11 "0.0.1"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.8
com.typesafe.play : play-slick_2.11 jar 2.1.0
io.toolsplus : atlassian-connect-play-api_2.11 jar 0.0.1

test (4)

Group / Artifact Type Version
com.typesafe.play : play-slick-evolutions_2.11 jar 2.1.0
org.scalatestplus.play : scalatestplus-play_2.11 jar 2.0.0
org.scalacheck : scalacheck_2.11 jar 1.13.4
com.h2database : h2 jar 1.4.193

Project Modules

There are no modules declared in this project.

Atlassian Connect Play Slick

Build Status codecov Maven Central

Atlassian Connect Play Slick is a Play module providing Slick implementation for data repositories defined in Atlassian Connect Play.

Quick start

atlassian-connect-play-slick is published to Maven Central for Scala 2.13 and Play 2.8.x, so you can just add the following to your build:

libraryDependencies += "io.toolsplus" %% "atlassian-connect-play-slick" % "x.x.x"

JDBC driver dependency

The Play Slick module does not bundle any JDBC driver. Hence, you will need to explicitly add the JDBC driver(s) you want to use in your application.

For instance, if you would like to use an in-memory database such as H2, you will have to add a dependency to it:

libraryDependencies += "com.h2database" % "h2" % "${H2_VERSION}"

After that follow the Play Slick documentation on how to add the Slick database configuration to your application.conf. E.g.

slick.dbs.default.profile"="slick.jdbc.H2Profile$
slick.dbs.default.db.driver="org.h2.Driver"
slick.dbs.default.db.url="jdbc:h2:mem:play"

That's it! You now have a Slick database backend to store Atlassian hosts.

Using Play Evolutions

Play Slick supports Play database evolutions.

To enable evolutions, you will need the following dependencies:

libraryDependencies += "com.typesafe.play" %% "play-slick-evolutions" % "${PLAY_SLICK_VERSION}"

Note there is no need to add the Play evolutions component to your dependencies, as it is a transitive dependency of the play-slick-evolutions module.

Finally add the evolutions configuration to your application.conf:

evolutions {
    db {
        default {
            enabled = true
            autoApply = true
            autocommit = false
            useLocks = true
        }
    }
}

Refer to the Play database evolutions guide on configuration details.

Contributing

Pull requests are always welcome. Please follow the contribution guidelines.

License

atlassian-connect-play-slick is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

io.toolsplus

ToolsPlus

Versions

Version
0.0.1