From 358e29b656c6efd6d5afd8d2ae840dc21308f0d9 Mon Sep 17 00:00:00 2001 From: Cerys Date: Thu, 28 Nov 2024 14:52:42 +0000 Subject: [PATCH] work on examples --- examples/QueryExample_Directory.php | 21 +++++++++++++++++++++ examples/QueryExample_Permission.php | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 examples/QueryExample_Directory.php diff --git a/examples/QueryExample_Directory.php b/examples/QueryExample_Directory.php new file mode 100644 index 0000000..5a80a52 --- /dev/null +++ b/examples/QueryExample_Directory.php @@ -0,0 +1,21 @@ +RelativePath("{0b368d41-7c15-42c8-899c-2b178ae9d983}") + ->Build() + ->RunQuery(DeegraphConnection::DB()) +; + +echo "Directory\n"; +echo "=========\n"; + +foreach($result->Map as $key=>$value) +{ + echo str_pad($key, 20) . ": " . $value . "\n"; +} diff --git a/examples/QueryExample_Permission.php b/examples/QueryExample_Permission.php index 5080ded..8475178 100644 --- a/examples/QueryExample_Permission.php +++ b/examples/QueryExample_Permission.php @@ -7,7 +7,8 @@ use Darksparrow\DeegraphInteractions\QueryBuilder\QueryBuilder; $permissions = QueryBuilder::Permission() - ->On("b222c121-0ed2-5819-bbf9-4db9aab85ea3") + ->On("{b222c121-0ed2-5819-bbf9-4db9aab85ea3}") + ->As("{b222c121-0ed2-5819-bbf9-4db9aab85ea3}") ->Build() ->RunQuery(DeegraphConnection::DB()) ;