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

Oracle trace logs show unexpected sql with invalid table name (upper case) but application not executing

Is this possible? We have our apps set up to use the table "videos" but lower case. I don't see where this query is coming from but the oracle trace shows that this is the only error in the trace. SELECT * FROM "VIDEOS" gives ORA-00942 In the…
JasonG
  • 5,794
  • 4
  • 39
  • 67
0
votes
1 answer

scalatra squeryl select where parameter type missing

I am a Scalatra beginner and I have the following route: get("/todos") { contentType = formats("json") val userid : Int = params.getOrElse("userid", halt(400)).toInt val limit : Int = params.getOrElse("limit", "0").toInt val…
viplezer
  • 5,519
  • 1
  • 18
  • 25
0
votes
1 answer

How to dump all tables using Squeryl

I'm trying to write a quick data browser for a database using Squeryl but I have difficulty iterating over all the tables in a generic way. Based on the Squeryl SchoolDb example i tried the following: def browseTable(name: String) = { …
Abie
  • 88
  • 4
0
votes
1 answer

squeryl: how to use oneToMany relation for constructing queries

I have a liftweb application in which I use Record/Squeryl as an ORM framework. Here is my schema: object AppSchema extends Schema { import org.squeryl.dsl.OneToManyRelation val groups = table[Group]("groups") val domains =…
Uniqus
  • 564
  • 1
  • 5
  • 21
0
votes
1 answer

trait ComputeMeasuresSignaturesFromGroupByState method compute apply no more than 7 variables

A have a request like this inTransaction { from(AppDb.bills, AppDb.legals)((billCount, legal) => where(legal.id in ( from(AppDb.bills)(bill => where(bill.individualId === individualId and bill.deleted === false) …
Pavel Varchenko
  • 727
  • 1
  • 11
  • 21
0
votes
2 answers

Lift Squeryl-Record select with google user id

I want to identify a user using the Google OAuth service. This returns a googleId which is 2^67 so it does not fit into the long datatype which I am currently using as the primary key in my table. Because of this I wanted to store the googleId in a…
Flo
  • 310
  • 1
  • 6
0
votes
1 answer

squeryl - saving bigDecimal to database

I'm using Scala's squeryl (version 0.9.6-RC1 with scala 2.10) and try to serialize my model to H2 database. My model class has some string fields and some BigDecimal types (scala.BigDecimal). I create database schema with Schema.create from my model…
Marcin Cylke
  • 2,100
  • 2
  • 21
  • 40
0
votes
1 answer

Squeryl Where clause with Nullable Column has no effect

I have a where clause that basically splits my table into two lists. One list where all the fields are "complete"(Not -1) and then one where any field is incomplete. The problem is that one of these fields is not only nullable, but I also only want…
damian
  • 1,419
  • 1
  • 22
  • 41
0
votes
1 answer

Squeryl Select Duplicates

I would like to find overlapping data with a Squeryl query. I can do so by using the method found here with normal SQL, but can't figure out how to do so using Squeryl. Basically I need to convert this line that finds Non-Distinct rows to…
damian
  • 1,419
  • 1
  • 22
  • 41
0
votes
1 answer

Json Write implementation

I meet a problem while implementing Json Write for my case class that I use with squeryl and which extend KeyedEntity. It looks like this: case class Order(fk_soc : Int, order_date: String, date_creation: Timestamp,fk_uther_author: Int, fk_statut :…
arussinov
  • 1,237
  • 11
  • 16
0
votes
2 answers

Squeryl dynamic join clauses

What I'm looking for seems fairly common but I can't seem to figure it out through the Squeryl api. I need to have a conditional piece to my on statement for a join. def getAllJoined( hasFallback:Option[String] = None ):List[(Type1,Type2)] =…
damian
  • 1,419
  • 1
  • 22
  • 41
0
votes
3 answers

Avoid Table initialize to create table in Squeryl/Activerecord

I have a database schema defined in mySQL already and I want to work on the play-2 with ActiveRecord application on top of it. However, when I start up the project, it gives me error: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table…
Joyfulvillage
  • 547
  • 1
  • 4
  • 13
0
votes
1 answer

Scala Data Modeling and Generics

I'm using the Play Framework and Squeryl to make a fairly basic front end for a database, but I know I'm rewriting too much code. I have different models to represent data in my db, and they all do the same six functions object ModelType{ def…
damian
  • 1,419
  • 1
  • 22
  • 41
0
votes
0 answers

Scalatra serializes object to JSON, but its relation is not serialized

I'm using Scalatra and Squeryl to make a Single Page Application example, so I need my Scalatra Servlet always returning JSON. It's working perfectly when serializing an object with no relations. I have a class Address that has a ManyToOne…
Juliano Alves
  • 2,006
  • 4
  • 35
  • 37
0
votes
1 answer

Squeryl: Error using custom functions and column name references

I'm using Squeryl with custom functions to do geo-spatial lookups, and the SQL produced is incorrect. I'm pulling my hair out trying to figure out what I did wrong. Here's a super simplified example of what I have: I created the following custom…
Joe
  • 1,723
  • 2
  • 14
  • 16