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();
Était-ce utile?

La solution

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

val id=SQL(
  """
INSERT INTO registration(userId,name) 
   VALUES (1,"sam")
  """
).executeInsert(scalar[BigInteger].single);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top