bcosca/fatfree — pull request #728 by sam-at-github (2014-11-07 10:52:23+00:00)
Title: Adds class \DB\MemoryJig.

See #727. This PR is one alternate layout. Might be nicer if did not have to split out extra classes just for this, but this was most logical implementation to me given \DB\Jig already exists, and that API had to be retro fitted to add this. Although does make adding other Jig types easier. For example you may want to override write().

Usage example:
```
86,'instr'=>'guitars'),
array('birth'=>82,'instr'=>'vocals'),
array('birth'=>88,'instr'=>'drums'),
array('instr'=>'keyboards'),
);
$db = new \DB\MemoryJig();
$db->write('team',$team);
$cursor = new \DB\Jig\Mapper($db, 'team');
$result = $cursor->find(['isset(@birth)']);
if($result) {
foreach($result as $k => $v) {
var_dump($v->cast());
}
}
$db->drop();
```