vaticle / typedb

TypeDB: the polymorphic database powered by types
https://typedb.com
Mozilla Public License 2.0
3.72k stars 338 forks source link

Fetch query can infer fetched attributes #6956

Closed flyingsilverfin closed 7 months ago

flyingsilverfin commented 7 months ago

Usage and product changes

We fix #6952 , by allowing attribute fetching to trigger reasoning. For example;

Given:

define
rule has-name: when { $x isa person; } then { $x has name "John"; };

Then the query:

match $x isa person;
fetch $x: name;

Can now retrieve name "John" as part of the fetch response.

Implementation

vaticle-bot commented 7 months ago

PR Review Checklist

Do not edit the content of this comment. The PR reviewer should simply update this comment by ticking each review item below, as they get completed.


Trivial Change

Code

Architecture