Questions tagged [scalikejdbc]

ScalikeJDBC is a tidy SQL-based DB access library for Scala developers. This library naturally wraps JDBC APIs and provides you easy-to-use and very flexible APIs.

97 questions
0
votes
1 answer

scalikejdbc, return generated ids for batch insert

I want to get all generated ids when batch insert gets executed. I use scalikejdbc 2.3.5. Is that possible at all? Couldn't find anything in docs
Alexander Kondaurov
  • 3,677
  • 5
  • 42
  • 64
0
votes
1 answer

Is there an example of using an hstore data structure with scalikejdbc and postgres?

We have a use case where using an hstore data structure inside a table would be very helpful for solving a problem with our current data model. Our current setup is with postgres and scalikejdbc. The problem is that there seems to be no…
Anthony Skipper
  • 924
  • 1
  • 9
  • 11
0
votes
1 answer

How to resolve type mismatch when mapping results using scalikeJDBC?

I typed a couple of lines on Single / Optional Result for Query @ ScalikeJDBC Docs: package org.mysample import scalikejdbc._ // define a class to map the result case class Emp(id: String, name: String) // QueryDSL object Emp extends…
philipjkim
  • 3,999
  • 7
  • 35
  • 48
0
votes
2 answers

Calling a string interpolator on a variable in Scala

I am writing some database query helper methods for my classes in Scala. This select method is intended to pluck certain columns from the Product table, specified as a comma-seperated list (String) of the desired columns. I want to be able to call…
Marco Prins
  • 7,189
  • 11
  • 41
  • 76
0
votes
2 answers

Access array using scalikejdbc?

I'm trying to use scalikejdbc to access schema that contains array field, i.e. CREATE TABLE foo ( id INTEGER PRIMARY KEY, events TEXT[] NOT NULL ); I can't find anything about arrays in documentation or examples, I can…
lambdas
  • 3,990
  • 2
  • 29
  • 54
-1
votes
1 answer

Test ScalikeJDBC Publisher with Scalatest

Do you have any idea why this code it should "add person s and then find-by-firstname" in { implicit session: DBSession => val person1: Person = Person.create(firstname1, lastname1, ssn1, email1, dob1).get val person3: Person =…
-5
votes
2 answers

How can i execute the sql query with parameter?

val resultList: List[List[String]] = sql""" select * from exchange_transaction """ .map( rs => List( rs.string("transaction_id") ) ) .list() .apply() execute the above code,it is ok but…
DJQTDJ
  • 71
  • 1
  • 9
1 2 3 4 5 6
7