Specifications of a bundle of relations and structures modules. They naturally are tightly connected to SQL, so can be viewed as a kind of SQL query builder.
Let's not forget that a relation defines two sets of related elements.
function relation_exec($relation)
Executes a relation, returns the results.
function hook_relation($op='get',$type='any',$left=NULL,$right=NULL)
Provides a mechaninsm to implement different relation models. $op can be get, set, get sql,set sql. Question remains if composition of relation can be performed via this interface. The get and set operations are executed immediately and their results returned.
function relation_compose($first,$second)
Nessesary to implement composite relations. A composite relation is the union of $first and $second relations.
function relation_intersect($first,second)
Returns the intersection of $first and $second relations.
function relation_exclude($first,second)
Returns everything in $first but not $second relations.
The relation node is used to provide a description of a relation type as well as store the sql statements and code in case of complex composite or higher order relations.
Main reason for its exhistance is to provide specialised indexing for tree structures of different relations. This is an extension to a relation type.
Provides the following functions
--------------------------------------
function tree_get_children
function tree_get_parents
function tree_get_siblings
function tree_get_previous
function tree_get_next
function tree_insert
A specialised module to implement a faster version for the composite of node-term-node relation.
function node_term_relation
Implements adjacency graphs for relations. The most common relation module.
function graph_relation