Questions tagged [squeryl]

Squeryl is a strongly typed, declarative and SQL like DSL for manipulating database objects from within the Scala language.

Squeryl is a strongly typed, declarative and SQL like DSL for manipulating database objects from within the Scala language.

201 questions
1
vote
2 answers

Performance problems using Squeryl and H2 database for a desktop application

I have a desktop application that persists its data in a local H2 database. I am using Squeryl to interface to the database. The size of the database is very small (some 10kB). I'm experiencing severe performance problems and there is extensive disk…
ziggystar
  • 28,410
  • 9
  • 72
  • 124
1
vote
2 answers

Concatenating databases with Squeryl

I'm trying to use Squeryl to take the contents of a table from one database, and append it to the equivalent table in another database. The primary key will have to be reassigned in the process, but I'm getting the error NULL not allowed for column…
Pengin
  • 4,692
  • 6
  • 36
  • 62
1
vote
1 answer

Booleans in Squeryl dynamic queries

I'm trying to use Squeryl (0.9.4 for scala 2.8.1) dynamic queries (.? and inhibitWhen(...)). They are working fine while I'm using String/Int/whatever fields, but seem to interfere with squeryl's syntax sugar for boolean conditions. Assuming we have…
Digal
  • 247
  • 2
  • 10
1
vote
0 answers

Updating ResultSets in Querulous?

How do I update ResultSets in Querulous? For example, I have a legacy application that does not have its password encrypted. I want to go back and bcrypt all these passwords using some bcrypt java library. Here's a solution I came up with using…
Bradford
  • 4,143
  • 2
  • 34
  • 44
1
vote
1 answer

HOW TO: squeryl full update

I'm new to squeryl and I have a question in squeryl full updates.. Can anybody please explain what is actually a full update and how it is done ? I couldn't really understand full update in squeryl guide. Thanx...
psaw.mora
  • 868
  • 1
  • 7
  • 18
1
vote
0 answers

Squeryl coalesce in order by

We're trying to create a Squeryl query in our Play application that will order the results by a coalesce of two columns, such that when the first column is NULL, the second column will be used in the ordering. Both columns are of type DateTime. So…
1
vote
1 answer

Getting error `No implicits found for parameter fieldMapper: FieldMapper` while using Squeryl version 0.9.14 with Scala version 2.13.1

I followed the following steps: Ran sbt new playframework/play-scala-seed.g8 to create new service of Play framework Added the line libraryDependencies += "org.squeryl" %% "squeryl" % "0.9.14" to my build.xml file (0.9.14 because that version is…
Sanjiban Bairagya
  • 704
  • 2
  • 12
  • 33
1
vote
1 answer

Not able to import Squeryl using SBT in a fresh service spawned from Scala's Play framework

I am going through https://www.squeryl.org/download.html to figure out how to import Squeryl using SBT. There it is written to add just one line libraryDependencies += "org.squeryl" %% "squeryl" % "0.9.5-6" in the build.sbt. However, when I add that…
Sanjiban Bairagya
  • 704
  • 2
  • 12
  • 33
1
vote
0 answers

squeryl partial update doesn't work when trying to update ZonedDateTime

For reference I have updated the example given on https://www.squeryl.org/ The partial update doesn't work with Date and gives error "cannot resolve symbol :=" update(songs)(s => where(s.title === "Watermelon Man") set(s.updatedAT :=…
1
vote
0 answers

Inserting into Oracle-SQL with Squeryl with millisecond precision doesn't seem to be working. Why?

I'm having some trouble getting Squeryl and Oracle-SQL to save my timestamp(6) data with millisecond precision. Every attempt I've made always shows me back the results with second precision, not millisecond: case class BookingEvent(created:…
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
1
vote
0 answers

Squeryl: Nullable foreign key

I am trying to declare a schema, where some entity has recursive relation (property parent_id may be either NULL or some value from the same table): class Merchant( val id: Int = 0, @Column("parent_id") var parentId: Option[Int] = None )…
dmitry
  • 4,989
  • 5
  • 48
  • 72
1
vote
1 answer

use squeryl with Play 2

I am new with Play and Scala and I am trying to import squeryl at build.sbt but without success. I am following the Play for Scala book. [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES …
Felipe
  • 7,013
  • 8
  • 44
  • 102
1
vote
1 answer

Scala//Squeryl/Play Retrieve multiple values from the same param

I have the following url : http://localhost/api/books/?bookId=21&bookId=62?authorId=2 But how i can retrieve all the bookId values with Scala ? I'm using the PlayFrameWork as the WebServer, so here's my code : val params = request.queryString.map {…
user708683
  • 500
  • 3
  • 9
  • 26
1
vote
3 answers

Explicit jsonb type cast in Squeryl

I'm using Squeryl 0.9.5-7 and Postgres 9.4 with jsonb datatype and want to insert some data: case class Log(id: String, meta: String) //meta will contain json val logs = table[Log] logs.insert(Log(randomId, "{\"Hi\": \"I'm a json!\"}")) But got a…
plomovtsev
  • 512
  • 4
  • 11
1
vote
0 answers

oneToManyRelation with CompositeKey

I am trying to create a database with squeryl. This DB needs a Mapping between 2 unrelated Tables. My Problem is that one of the unrelated Tables has a CompositeKey2 as PrimaryKey. When I try to create my Schema, it always throws an Exception. I've…
B. Kemmer
  • 1,517
  • 1
  • 14
  • 32