slick Questions

5

Solved

I have evolution problem Unknown data type: "JSONB" when running tests in playframework using playframework v2.6.6 for scala play-slick v3.0.2 play-slick-evolutions v3.0.2 postgresql - 42.0.0 h2...
Floorman asked 21/12, 2017 at 11:53

5

Solved

I am using Slick 1.0.0 with play framework 2.1.0. I am getting the following error when I query my Users table. The value of LOGIN_ID is null in DB. The query I am executing is: val user = { for...
Nesta asked 31/3, 2013 at 16:58

2

Solved

I have the (working) following code: val actions = (for { _ <- slickUsers.insertOrUpdate(dbUser) loginInfo <- loginInfoAction _ <- slickUserLoginInfos += DBUserLoginInfo(dbUser.userID,...
Cuneal asked 23/11, 2016 at 7:33

4

Solved

I've created an empty (activator template play-scala) Play 2.4.3 application with PostgreSQL 9.4 database and trying to use Slick 3.1.0 with it, but it's throwing an error: play.api.UnexpectedExce...
Bifilar asked 16/11, 2015 at 14:37

2

I'm workihng with Play! 2.5, Slick 3 and PostgreSQL 9.6. I'm trying to use a simple plain SQL query with an optional UUID but I get this error: Slick: could not find implicit value for paramete...
Fourdimensional asked 20/2, 2017 at 10:21

5

Solved

For example, I want to create the following query: SELECT c.* FROM Coffees c WHERE c.name IN ('robusta', 'arabica') My attempt failed: val cnames = List("robusta", "arabica") sql""" SELECT c.* ...
Irrelevance asked 1/7, 2013 at 15:41

5

Solved

There is a similar question here but it doesn't actually answer the question. Is it possible to use IN clause in plain sql Slick? Note that this is actually part of a larger and more complex quer...
Boogeyman asked 1/7, 2015 at 8:46

3

I've a table user_permissions which has 46 permission columns along with id and created_date. This table has a corresponding UserPermissions class: class UserPermission(val id: Long, val createdD...
Customs asked 9/7, 2015 at 14:37

3

Solved

I am new to Scala and Slick and trying to write a plain SQL queries with Slick interpolation. Case 1: I want the generalize the code so that queries are stored as constants. for instance: val SQ...
Abuttals asked 6/12, 2014 at 6:56

6

Solved

I am new to Slick and using Slick 3.1.1. My table looks like import java.sql.{Blob, Timestamp} import slick.collection.heterogeneous.HNil import slick.driver.MySQLDriver.api._ case class Anoma...
Tudela asked 12/5, 2016 at 21:56

4

Solved

I have the follow enum: object LoginStatus extends Enumeration() with BitmaskedEnumeration { type LoginStatus = Value val Active = Value("A") val Inactive = Value("I") } I need to persist the...
Cowbell asked 9/10, 2013 at 13:42

3

Solved

Maybe a silly question. But I have not found an answer so far. So how do you represent the SQL's "LIKE" operator in SLICK?
Workday asked 5/2, 2013 at 5:34

2

Solved

I am new in scala slick . why can not found column and O in slick v3.1.1 please view this example code : import slick.driver.PostgresDriver import slick.lifted.Tag import slick.model.Table ; cas...
Lowrance asked 16/12, 2016 at 19:16

3

Solved

I want to write some integration tests for a service that runs slick and then clean a postgresql database up afterward up by rolling back a transaction, but I don't see a way to do it. I understand...
Nunatak asked 20/1, 2016 at 16:33

2

Solved

In slick table there is a tag parameter: class Companies(tag: Tag) extends Table[Company](tag,"COMPANY") {...} What is it used for, and is there any way not to write it with each table class def...
Said asked 6/8, 2015 at 7:55

3

Solved

In Slick's documentation examples for using Reactive Streams are presented just for reading data as a means of a DatabasePublisher. But what happens when you want to use your database as a Sink and...
Gammon asked 4/4, 2016 at 10:27

1

In Slick 3.1, with the complete redesign of the new API, it seems to be impossible to view the generated SQL statements when doing an insert. If you have something like this val action = DBIO.seq...
Seabrooke asked 14/10, 2015 at 12:8

3

Solved

I'm trying to perform multiple joins in Slick 3.1.1. The result that I would like to achieve is this: SELECT * FROM customer LEFT JOIN customer_address ON customer.id = customer_address.customer_i...
Adala asked 5/4, 2016 at 8:1

2

I am trying to figure out how to work with slick streaming. I use slick 3.0.0 with postgres driver The situation is following: server have to give client sequences of data split into chunks limite...
Tumid asked 10/7, 2015 at 12:13

3

Where in the Slick 3 documentation is it documented on how to do an insertOrUpdate-like operation?
Terriss asked 4/6, 2015 at 20:0

3

Solved

I'm trying to figure out a way to have async before and after statements where the next test cases aren't run until the completion of the action inside of the test case. In my case, it is the creat...
Amorist asked 10/9, 2016 at 1:52

7

Solved

How does one insert records into PostgreSQL using AutoInc keys with Slick mapped tables? If I use and Option for the id in my case class and set it to None, then PostgreSQL will complain on insert ...
Camembert asked 2/11, 2012 at 16:20

6

Solved

In Scala Slick, a database schema can be created with the following: val schema = coffees.schema ++ suppliers.schema db.run(DBIO.seq( schema.create )) From the bottom of this documentation page...
Jocosity asked 26/11, 2015 at 2:35

1

I know as of slick 2.1. one can use ConstColumn for take and drop in precompiled Query's using "Compiled". private val findXXXCompiled = Compiled { (someId:Column[Long], sortBy:???, drop:ConstC...
Culpepper asked 20/11, 2014 at 8:10

5

In order to save me having to create so many methods, I tried passing in Option's into my method and then checking if the Option is defined, if so, then apply the filter. def getUsers(locationId: ...
Wood asked 1/7, 2014 at 16:10

© 2022 - 2024 — McMap. All rights reserved.