Questions tagged [slick]
Slick acronym for Scala Language-Integrated Connection Kit, is a modern database query and access library for Scala by Lightbend.
slick
2,472
questions
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 ...
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 ...
0
votes
0
answers
8
views
slick slider is not working in Linus-OS, fire-fox-Broswer,(for desktop)
in linux-OS,In a website i used slick slider, i downloaded the bundle and used the links. All are good in other browser even in fire-fox "when we inspect it for mobile", but for desktop it ...
0
votes
1
answer
66
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 ...
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 ...
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" ...
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: ...
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 ...
0
votes
1
answer
83
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 ...
0
votes
1
answer
161
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(&...
0
votes
1
answer
127
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 ...
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] = ...
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(_....
1
vote
1
answer
221
views
Fit image to screen using CSS with Slick Carousel
I am making an image carousel using Slick. I want to fit the width of the image along screen and the height is scaled with the width. Below is my index.html:
<!DOCTYPE html>
<html>
<...
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 ...