inc/relation.php
Classes to handle relations.
See Relation function on the syntax to use.
Classes
swRelationLineHandler
Executes Relation code line by line
- __construct($m = 'HTML')
 - run($t, $internal= , $internalbody = )
 - run2($t, $internal= , $internalbody = )
 - setBeep() not implemented
 - setMessage () not implemented
 
swRelation
Holds a relation an manipulates it.
- __construct($columns)
 - addColumn($s)
 - arty()
 - assert($t)
 - assert2($method, $expression)
 - cardinality()
 - cleanColumn($s)
 - doClone()
 - delete($condition)
 - deserialise()
 - difference($r)
 - emptyTuple()
 - extend($t)
 - extend($label, $expression)
 - format1($t)
 - format12($pairs)
 - format2($dm,$f)
 - import($value)
 - insert($t)
 - insert2($fields)
 - intersection($r)
 - join($r, $expression)
 - joinHash($r, $expression)
 - limit($t)
 - limit2($start,$length)
 - order($t)
 - order2($pairs)
 - parse($t)
 - parse2($field, $reg, $labels)
 - print2()
 - project($t)
 - project2($pairs)
 - rename1($t)
 - rename12($pairs)
 - select1($condition)
 - serialize()
 - getCSV()
 - setCSV($lines, $pad=false)
 - getTab()
 - setTab($lines)
 - getJSON()
 - setJSON($s)
 - toChart($options)
 - toFields($limit=0)
 - toHTML($limit=0)
 - toTemplate($tmp)
 - union($r)
 - update($condition, $label, $expression)
 - validName($s)
 
swTuple
Holds a tuple. This is then a constant.
- __construct($list)
 - arity
 - fields()
 - hash()
 - hasKey($k)
 - sameFamily($t)
 - value($s)
 
swOrderedDictionary
Utility for custom order
- order()
 - compare($a,$b)
 
swAccumulator
Acumulator for aggregation in the project instruction.
- __construct($m)
 - add()
 - doClone()
 - pAvg()
 - pConcat()
 - pCount()
 - pCustom()
 - pMax()
 - pMaxS() text version
 - pMedian()
 - pMedianS() text version
 - pMin()
 - pMinS() text version
 - pStDev()
 - pSum()
 - reduce()
 
swRelationError
Functions
array_clone($arr)
swNumberformat($d, $f)
cText12($d)
Rounds to 12 significant digits.