Skip to content
Snippets Groups Projects
Commit d978bb7b authored by npedot's avatar npedot
Browse files

refacts files in folders

parent 656b001e
No related branches found
No related tags found
No related merge requests found
Showing
with 26 additions and 59 deletions
match
$x isa human, has name $name;
get $x, $name;
insert $h1 isa human, has name "May";
usage:
@echo "make run - to run a standalone typedb server on $TYPEDB_VOLUME directory."
run:
sudo docker run -it --rm \
--name typedb \
......
File moved
......@@ -2,8 +2,8 @@
match
$x isa person, has name $name;
$y isa person;
$z isa person;
$y isa person, has italian true;
$z isa person, has italian false;
(caller:$x, callee:$y) isa call;
(caller:$y, callee:$z) isa call;
get $name;
......
define
call sub relation,
relates caller,
relates callee;
person sub entity,
plays call:caller,
plays call:callee,
owns name @key,
owns italian;
name sub attribute,
value string;
italian sub attribute,
value boolean;
define
call sub relation,
relates caller,
relates callee;
person sub entity,
plays call:caller,
plays call:callee,
owns name,
owns italian;
name sub attribute,
value string;
italian sub attribute,
value boolean;
File moved
insert
$maria isa person, has name "Maria";
$paolo isa person, has name "Paolo", has italian true;
$andrea isa person, has name "Andrea";
$sue isa person, has name "Sue", has italian false;
$f1 (caller:$maria, callee:$andrea) isa call;
$f2 (caller:$maria, callee:$paolo) isa call;
$f3 (caller:$paolo, callee:$andrea) isa call;
$f4 (caller:$andrea, callee:$sue) isa call;
# Query: we expect the answer to be $name = "Maria"
match
$x isa person, has name $name;
$y isa person, has italian true;
$z isa person, has italian false;
(caller:$x, callee:$y) isa call;
(caller:$y, callee:$z) isa call;
get $name;
define
call sub relation,
relates caller,
relates callee;
person sub entity,
plays call:caller,
plays call:callee,
owns name,
owns italian;
name sub attribute,
value string;
italian sub attribute,
value boolean;
match $p isa thing; delete $p isa thing;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment