Skip to main content

All Questions

Tagged with
0 votes
0 answers
41 views

Slick postgresql Inserting Query with AutoIncr

I'd like to work with psql from scala.In this purpose i started using slick. But i get a problem while trying to insert row to a class define with an O.AutoInc property: Here is a simplified example ...
Jay_boo's user avatar
0 votes
1 answer
46 views

How to get separate results for combined DBActions in Slick

I need help on this situation. I have to insert multiple records in table A and a single record in table B. I need all of them in a single transaction but also need to get separate results for each ...
Guillermo Coscarelli's user avatar
0 votes
1 answer
65 views

Optimizing CPU Utilization and Throughput in Akka / Pekko Streams on HTTP

Consider the following code: def getFlow()(implicit appConfig: AppConfig, actorSystem: ActorSystem): Flow[BrandSafetyServiceRequest, HttpResponse, NotUsed] = { implicit val ...
Zvi Mints's user avatar
  • 1,102
0 votes
0 answers
70 views

Feasibility of database as middleware

This question is from an architectural perspective. Encapsulating the domain business logic in a single place is a software engineering best practice. However, the logic often percolates to the ...
Jimmy Isaac's user avatar
0 votes
2 answers
62 views

Scala Slick. How to change a column value using Case

case class User(name: String, age: Int) def changeNameQuery(): Query[UserTable, User, Seq] = { TableQuery[UserTable].map { user => (Case If (user.name === "A") Then "B" ...
George's user avatar
  • 63
0 votes
1 answer
66 views

How to pass a variable as part of a record deletion in scala with slick

I have a scala method for deleting a record in postGres. This uses scala-slick as well. The original implementation worked fine. Here is that implementation: def deleteRecord(username: String, id: ...
Timothy Clotworthy's user avatar
0 votes
0 answers
59 views

Slick - Error value <> is not a member of - while using ForeignKey

I am using Slick to connect to a PostgresDB I have defined three tables: Brand, Category, Item case class Category(categoryId: UUID,name:String) case class Brand(id:UUID, name: String) case class ...
Anderson_502's user avatar
0 votes
1 answer
82 views

How can I add a query by array index in scala slick?

Using scala slick, how would you generate a query filter using plain text? Context - I'm trying to filter on an array position column, doesn't appear to be supported by the slick extensions provided ...
Steve B.'s user avatar
  • 56.8k
0 votes
1 answer
157 views

Parameter Binding or String Interpolation for Building SQL Plain Queries in Scala?

def insertToTableSQLQuery(tableName: String, columnDefinitions: Seq[ColumnDefinition], rowData: ListBuffer[Any]): Future[Int] = db.run { val columns = columnDefinitions.map(_.name).mkString(&...
SM-171's user avatar
  • 3
0 votes
1 answer
126 views

Slick doesn't run Evolutions with Play Framework

I have an app that was using scala.play with a jdbc connection to a postgresql database and play evolutions and I have been trying to migrate to using slick, to reduce the amount of boilerplate in ...
Arthur's user avatar
  • 3,398
1 vote
0 answers
72 views

Trait for composite primary keys in Slick tables?

I have 2 tables case class SimplePKDB(id: Long = 0L) object SimplePKDB { final class SimplePKTable(tag: Tag) extends Table[SimplePKDB](tag, "simple_table") { def id: Rep[Long] = ...
Максим Дерюгин's user avatar
0 votes
0 answers
66 views

How to do sql queries with intersect with Slick?

I am trying to build sql queries with slick where I need to intersect the results. I can build it with union (from Slick docs): val q1 = coffees.filter(_.price < 8.0) val q2 = coffees.filter(_....
Guillem I's user avatar
0 votes
0 answers
38 views

Scala play slick postgresql

I am trying to get the hang of slick and have a simple client to save and load users import play.api.db.slick.DatabaseConfigProvider import com.github.tminglei.slickpg._ import ...
Arthur's user avatar
  • 3,398
0 votes
1 answer
69 views

Scala, Slick, Cats - How to map different SQL errors with OptionT?

I have a simple slick query which run on database: def method(): Future[Either[Error, MyCustomDTO]] = OptionT(database.run(query)) .map(MyCustomDTO(_)) .toRight(dataNotFound()) .value The ...
Developus's user avatar
  • 1,462
0 votes
0 answers
35 views

slick 3.3.3, oracle 11g, scala

I want to use slick.jdbc.OracleProfile to support the autoincremention of primary key with oracle 11g. I use slick version 3.3.3. I've noticed that in slick.jdbc.OracleProfile there is method that ...
Im89's user avatar
  • 149

15 30 50 per page
1
2 3 4 5
147