weaver-commons-js
Elementary components.
Those are the basic elements that is possible to add at graphDatabase. At this moment the graphDatabases supported are Virtuoso via weaver-server-virtuoso and Neo4j via weaver-server-neo4j
The principal aim of weaver-commons-js is to make easy interact with this objects at the moment of transaction and querys on our weaver javascript code. It let you do things like create a $INDIVIDUAL and test if it is valid:
WeaverCommons = require'weaver-commons-js'Individual = WeaverCommonsIndividual Individual r2d2 = individual_payload if r2d2isValid ### do stuff like a transaction
At the moment we count with 3:
- 🔵 $INDIVIDUAL
- 🔷 $INDIVIDUAL_PROPERTY
- 🔲 $VALUE_PROPERTY
💲INDIVIDUAL
An $INDIVIDUAL object in json looks like this:
"payload": "type": "$INDIVIDUAL" "id": "cipy1yeeh00023k6kboj6rzrh" "attributes": "name": "Unnamed" "type": "$INDIVIDUAL" "relations": {}
💲INDIVIDUAL_PROPERTY
An $INDIVIDUAL_PROPERTY object in json looks like this:
"payload": "type": "$INDIVIDUAL_PROPERTY" "id": "cipy1zfnm000i3k6klvlzjfql" "attributes": "predicate": "eats" "type": "$INDIVIDUAL_PROPERTY" "relations": "subject": "cipy1yeeh00023k6kboj6rzrh" "object": "cipy1yt7l00073k6k3fusc8cg"
💲VALUE_PROPERTY
An $VALUE_PROPERTY object in json looks like this:
"payload": "type": "$VALUE_PROPERTY" "id": "cipy1zs5x000l3k6khveg0qqh" "attributes": "predicate": "replaces" "object": "eats" "type": "$VALUE_PROPERTY" "relations": "subject": "cipy1yeeh00023k6kboj6rzrh"