-
Notifications
You must be signed in to change notification settings - Fork 19
Data Model: Simple Entities
Paula Gearon edited this page Oct 9, 2018
·
2 revisions
This simple JSON document may be imported in the API:
[{"string_data": "A string",
"number_data": 5}]
The resulting graph tuples will be:
[:mem/node-0001 :string_data "A string"]
[:mem/node-0001 :number_data 5]
The equivalent Pabu assertions are:
string_data(mem/node-0001, "A string").
number_data(mem/node-0001, 5).
A JSON document with 3 simple objects:
[{"string_data": "A string",
"number_data": 5}
{"string_data": "second entity",
"number_data": 6}
{"id": "0000-1234-5678",
"label": "third"}]
Resulting graph tuples:
[:mem/node-0001 :string_data "A string"]
[:mem/node-0001 :number_data 5]
[:mem/node-0002 :string_data "second entity"]
[:mem/node-0002 :number_data 6]
[:mem/node-0003 :id "0000-1234-5678"]
[:mem/node-0003 :label "third"]
Resulting Pabu:
string_data(mem/node-0001, "A string").
number_data(mem/node-0001, 5).
string_data(mem/node-0002, "second entity").
number_data(mem/node-0002, 6).
id(mem/node-0003, "0000-1234-5678").
label(mem/node-0003, "third").