[Developers] tree mqlwrite operations?

Christopher R. Maden crism at metaweb.com
Tue Nov 25 21:21:03 UTC 2008


augusto callejas wrote:
> is there a way in mql to perform an operation across a set of nodes?
> for instance "XX1" person has two children, and i'd like to update
> their "name" properties all at once without haven't to specify each
> child's id.

You can do this write, but not automatically applying the change to each.

{
   "children" : [
     {
       "id" : "x1",
       "name" : {
         "connect" : "update",
         "lang" : "/lang/en",
         "value" : "XX4"
       }
     },
     {
       "id" : "x2",
       "name" : {
         "connect" : "update",
         "lang" : "/lang/en",
         "value" : "XX4"
       }
     }
   ],
   "name" : "XX1",
   "type" : "/people/person"
}

You will need to do a read query first to get the IDs of the children.

~Chris
-- 
Christopher R. Maden
Data Architect
Freebase.com: <URL: http://www.freebase.com/ >
Metaweb Technologes, Inc. <URL: http://www.metaweb.com/ >


More information about the Developers mailing list