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
92
votes
1 answer

HowTo: Custom Field in Lift-Record-Squeryl

I'm trying to make a EnumListField in Lift/Record/Squeryl, similar to MappedEnumList in LiftMapper. The storage type should be Long/BIGINT. I understand that if I define: def classOfPersistentField = classOf[Long] Then Squeryl will know it should…
Sebastien Diot
  • 7,183
  • 6
  • 43
  • 85
19
votes
0 answers

Which project is more mature, ScalaQuery or Squeryl?

For me both of them looks quite similar if it's going to features, but it's hard to say without using them (yet). So I have few questions: 1) Are they really feature comparable (more or less)? 2) Is there any example of enterprise or big open…
Piotr Kukielka
  • 3,792
  • 3
  • 32
  • 40
11
votes
1 answer

How to integrate the Scala Squeryl ORB with play 2.0 framework?

I am trying to use Squeryl ORB with play 2.0 framework, but when calling DB.getConnection() during initialization I get: BadPath: path parameter: Invalid path ' - could not find datasource for defaultdb': Token not allowed in path expression: '-'…
Roar Skullestad
  • 2,427
  • 3
  • 26
  • 35
10
votes
2 answers

Heroku memory leak with Play2 scala

Was doing some stretch (ab) test to my 1 heroku dyno and dev database with 20 connections limit. During the calls (that access database with squeryl the heap allocation is increasing causing R14 (memory more than 512MB)) I cannot seem to reproduce…
weakwire
  • 9,284
  • 8
  • 53
  • 78
9
votes
2 answers

Session must be bound error using Squeryl

Update: Okay, I fixed the problem I was having, but I'm still not quite sure what I was doing wrong. In any case, I wrote the following method in IRCDB: def tryit[T](p: => T) = { Class.forName("org.h2.Driver") //what's the point in this...? …
UnknownUnknowns
  • 838
  • 8
  • 17
8
votes
3 answers

Play migrations alternatives

I am about to start a new project that will use the Play! 2 framework for Scala, probably using Squeryl as ORM (but maybe Slick would be fine too, if it ready in time). Now, Play! has a feature to upgrade your database using migrations.…
Andrea
  • 20,253
  • 23
  • 114
  • 183
8
votes
2 answers

How to make Squeryl work with the Play! Framework?

I'm trying to learn how to make a simple database app with Play and Squeryl. I've made the Tasks app from the Play tutorial, but I want to change the model / schema so that it uses Squeryl instead of Anorm. I've been looking at different tutorials,…
user1390113
  • 262
  • 4
  • 10
6
votes
2 answers

quote table names in squeryl

I have a table named group in a mysql db. When I map this table to squeryl I get SQL syntax errors since the table name group is not quoted (should be select * from `group`). Is there any way I can tell squeryl to quote certain table names?
Fredrik Jansson
  • 3,764
  • 3
  • 30
  • 33
5
votes
1 answer

Squeryl session management with 'using'

I'm learning Squeryl and trying to understand the 'using' syntax but can't find documentation on it. In the following example two databases are created, A contains the word Hello, and B contains Goodbye. The intention is to query the contents of A,…
Pengin
  • 4,692
  • 6
  • 36
  • 62
5
votes
1 answer

How to define a m:n relation with additional attributes in Squeryl?

Given a legacy database with a m:n relation and some additional attributes for the relation, how can this defined with squeryl. At the end the tables should look like this: +--------------+ +---------------+ +----------------+ |…
Steffen
  • 8,033
  • 1
  • 28
  • 34
5
votes
1 answer

value === is not a member of type parameter TKey (using Squeryl)

I'm trying to write a simple BaseDao class using the excellent squeryl ORM framework. However I've come across a problem when using generic typed keys. I get a compile error when I try and use the '===' operator in my generic BaseDao class. The…
Robert
  • 1,487
  • 1
  • 14
  • 26
5
votes
1 answer

Squeryl: Run query explicitly

When I create a query in squeryl, it returns a Query[T] object. The query was not yet executed and will be, when I iterate over the Query object (Query[T] extends Iterable[T]). Around the execution of a query there has to be either a transaction{}…
Heinzi
  • 5,793
  • 4
  • 40
  • 69
4
votes
2 answers

How to use Squeryl's externalTransactionManagementAdapter with play 2.0?

Has anyone succeeded in using Squeryl's externalTransactionManagementAdapter with play framework 2.0?: object Global extends GlobalSettings { override def onStart(app: Application) { …
Roar Skullestad
  • 2,427
  • 3
  • 26
  • 35
4
votes
2 answers

Memory leaks when recreating Squeryl in-memory database

I'm writing a simple Scala & Squeryl application. For test purposes, each time I run 'test' in sbt, an in-memory H2 db is created and populated with test data. After each run I can see that memory usage of java.exe (inside which sbt is running) in…
Oleg Kunov
  • 179
  • 2
  • 12
4
votes
2 answers

Problem with Squeryl and Play! framework in scala

I have a curious issue when using Squeryl with Play!. Normal usage and everything else works completely fine. However, if I use more than one transaction in the same request, I get an error. That's how I set up Squeryl: def initDB() { import…
Mononofu
  • 902
  • 7
  • 15
1
2 3
13 14