Getting Started

Including the Relate in your project and general information about getting started with Relate

Step 1: SBT

Getting started with Relate is relatively simple. First, you’ll need to add the dependency in your build.sbt. Because Relate’s releases are hosted with Sonatype, you’ll also need to add Sonatype as one of the resolvers.

// build.sbt
libraryDependencies += "com.lucidchart" %% "relate" % "2.0.1"

resolvers += "Sonatype release repository" at "https://oss.sonatype.org/content/repositories/releases/"

Step 2: Import All the Things!

Next, you’ll need to import Relate before you can start writing queries or retrieving data. Additionally, you’ll have to supply Relate with the Connection to use when making queries (this can be supplied implicitly).

import com.lucidchart.relate._
import java.sql.Connection

implicit val connection: Connection = ... // get a connection

// write awesome queries!

That’s it! You’re ready to move on and write queries!