Composite Data Type Variables¶
Definitions for composite (e.g. arrays) data types.
Composite data types are resolved to neo4j native arrays.
- author:
Athanasios Anastasiou
- date:
Jan 2018
- class neoads.composite_array.CompositeArrayDate(value, name=None, **kwargs)¶
A native Neo4J array of dates.
- Parameters:
value (neomodel.ArrayProperty) – The actual array value
- DoesNotExist¶
alias of
CompositeArrayDateDoesNotExist
- class neoads.composite_array.CompositeArrayNumber(value, name=None, **kwargs)¶
A native Neo4j array of numbers.
- Parameters:
value (neomodel.ArrayProperty) – An array of Real numbers.
- DoesNotExist¶
alias of
CompositeArrayNumberDoesNotExist
- from_query_IDs(query, refresh=True, auto_reset=False)¶
Executes a special type of query to populate the array of numbers with the IDs of the entities in the query.
Consequently, the query must have a specific structure. The general pattern of the query is as follows:
MATCH Array WITH Array [query] WITH Array,collect(id(ListItem)) as ItemIds set Array.value=ItemIds;Where
[query]is an INCOMPLETE Cypher MATCH query with at least one named Node that is called “ListItem”. That named node is the node whose id will be catalogued in the list.Warning
The predefined “Array” must be propagated in subsequent withs for it to go all the way to the other side of the query and finish.
Note
This functionality is not meant to substitute double linked lists for collections of articles because it relies heavily on Node IDs which are subject to change. Instead, this functionality is meant to ASSIST in creating Double Linked Lists of articles FROM lists of IDs
- Parameters:
query (str) – A Cypher Query making specific reference to ListItem.
refresh (bool) – Whether this action should trigger a refresh or not
auto_reset (bool) – Whether to clear the list if it is found to be populated
- Returns:
self