typeql icon indicating copy to clipboard operation
typeql copied to clipboard

Graql: Optionally fetch attributes

Open grabl opened this issue 7 years ago • 1 comments

This issue was originally posted by Harry Blakiston Huoston on 2018-08-26 09:06.

This is a question at first but may turn into a feature request. Does grakn support any non-strict attribute requests i.e lets say I am fetching personal information belonging to a person that can either be a phone or an address (both separate child entities of a common entity "property") the two will share a field detail (either +447773078736) or (Flat 70) respectively, then the address may have additional attributes (street, province, city, postalCode and country). A query that allowed me to fetch just the detail if the entity is a "phone" and then the detail, street, province, city, postalCode and country if the entity is an "address".

grabl avatar Sep 22 '18 01:09 grabl

This comment was originally posted by Harry Blakiston Huoston on 2018-08-26 09:10:47+02:00.

Kind of like one of the below I think would work really nicely $p isa property   has detail $detail   maybe has street $street   maybe has province $province... or $p isa property  has detail $detail   if $p.type is 'address'     has street $street     has city $city ...    

grabl avatar Sep 22 '18 01:09 grabl

Optionals feature request is now covered by https://github.com/vaticle/typedb/issues/6322

flyingsilverfin avatar Jan 10 '23 13:01 flyingsilverfin