couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramesh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-1660) Problem in Appending data into array of existing document
Date Wed, 30 Jan 2013 10:27:16 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-1660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566349#comment-13566349
] 

Ramesh commented on COUCHDB-1660:
---------------------------------

I am new to couchDB. I am using couchdb4j.jar library (Java library) to insert the document
from Java program. How to implement update handler in Java otherwise is there any another
solution.
                
> Problem in Appending data into array of existing document
> ---------------------------------------------------------
>
>                 Key: COUCHDB-1660
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1660
>             Project: CouchDB
>          Issue Type: Question
>            Reporter: Ramesh
>
> I have a document like this below:
> {
> "_id": "00001.74365CF0449457AA5FB52822DBE1F22A",
> "_rev": "1-1b976f3adb75c220aff28b4c69f41e18",
> "game": "UT411",
> "guid": "74365CF0449457AA5FB52822DBE1F22A",
> "sid": "00001",
> "playerinfo": [
>    {
>        "timestamp": "1315503699.777494167",
>        "name": "Elisa",
>        "ip": "87.66.181.166",
>        "gear": "FMAOSTA",
>        "weapmodes": "01000110220000020000",
>        "isp": "ADSL-GO-PLUS",
>        "geoloc": "Hotton:50.266701:5.450000",
>        "sid": "00001"
>    }
>    ]
> }
> what i want to achieve is adding one more player information with existing players info.
under the same array. In order to have my doc looking like this
> {
> "_id": "00001.74365CF0449457AA5FB52822DBE1F22A",
> "_rev": "1-1b976f3adb75c220aff28b4c69f41e18",
> "game": "UT411",
> "guid": "74365CF0449457AA5FB52822DBE1F22A",
> "sid": "00001",
> "playerinfo": [
>    {
>        "timestamp": "1315503699.777494167",
>        "name": "Elisa",
>        "ip": "87.66.181.166",
>        "gear": "FMAOSTA",
>        "weapmodes": "01000110220000020000",
>        "isp": "ADSL-GO-PLUS",
>        "geoloc": "Hotton:50.266701:5.450000",
>        "sid": "00001"
>    },
>    {
>        "timestamp": "1315503739.234334167",
>        "name": "Elisa-new",
>        "ip": "87.66.181.120",
>        "gear": "FMAGGGA",
>        "weapmodes": "01000110220000020000",
>        "isp": "ADSL-GO-PLUS",
>        "geoloc": "Hotton:50.266701:5.450000",
>        "sid": "00001"
>    }
>    ]
> }
> Is there a way to achieve this...
> Thanks in advance!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message