Blazingly fast database access in Scala

Write Queries in Plain SQL

caseclassJedi(name:String,isChosenOne:Boolean)vallastName="Skywalker"sql"SELECT * from jedi WHERE last_name=$lastName".asList{row=>Jedi(row.string("first_name")+row.string("last_name"),row.bool("is_chosen_one"))}

SQL is already the best domain-specific language for querying relational databases. We don't need another. Ultimately, ORMs obscure the underlying queries and cause lots of headaches.

With Relate, you write your queries in the language nature intended, while interacting with the inputs and results in a high-level and performant way.

Boost Performance

In production situations, every millisecond matters. And while Relate may not be the prettiest face in the crowd, it does the best at managing large queries and large results.

Selecting rows with 10 columns

Inserting rows with 10 columns

Pure JDBC is the hard bottom line for performance, but Relate gets pretty close to that. At Lucid, we make queries at scale, and we've been extremely pleased with Relate's performance.

If you'd like to run the benchmarks yourself, you can find them in the Relate repo!

Include Relate in Your Project

All it takes is adding a dependency on Relate in your SBT configuration!

Explore the Documentation

Relate has a lot of cool features, like pararmeter sequences and query composition. To get the most of it, and for a more complete overview of the project, continue on to the rest of the documentation or use the hamburger menu to select a specific topic.