phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: prepareAndExecute with UPSERT not working
Date Sun, 17 Apr 2016 19:44:31 GMT
What version of Phoenix are you using?

Plamen Paskov wrote:
> 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