Question

The problem is that executeInsert returns the Long type result But i want the executeInsert to return the java.math.BigInteger type of result.Since, the userId in database is of 20 digit long. Now, i am trying to parse the executeInsert result to java.math.BigInteger using ResultSetParser. Could anyone write solution:

val id=SQL(
  """
    INSERT INTO registration(userId,name) 
       VALUES (1,"sam")
  """
).executeInsert();
Was it helpful?

Solution

Yes.!! I found the solution. It works:

val id=SQL(
  """
INSERT INTO registration(userId,name) 
   VALUES (1,"sam")
  """
).executeInsert(scalar[BigInteger].single);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top