phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Plamen Paskov <plamen.pas...@next-stream.com>
Subject prepareAndExecute with UPSERT not working
Date Thu, 14 Apr 2016 13:12:41 GMT
Hey folks,
I'm trying to UPSERT some data via the json api but no luck for now. My 
requests looks like:

{
   "request": "openConnection",
   "connectionId": "6"
}

{
   "request": "createStatement",
   "connectionId": "6"
}

{
   "request": "prepareAndExecute",
   "connectionId": "6",
   "statementId": 9,
   "sql": "UPSERT INTO us_population VALUES('IL','Chicago',10000000)",
   "maxRowCount": -1
}

The response for prepareAndExecute looks like the operation is 
successful but i don't see the new data added to the table.

{
   "response": "executeResults",
   "missingStatement": false,
   "rpcMetadata": {
     "response": "rpcMetadata",
     "serverAddress": "ip-172-31-27-198:8765"
   },
   "results": [
     {
       "response": "resultSet",
       "connectionId": "6",
       "statementId": 9,
       "ownStatement": false,
       "signature": null,
       "firstFrame": null,
       "updateCount": 1,
       "rpcMetadata": {
         "response": "rpcMetadata",
         "serverAddress": "ip-172-31-27-198:8765"
       }
     }
   ]
}

Any ideas?
Thanks in advance!

Mime
View raw message