示例#1
0
文件: find.php 项目: tokushima/ebi
eq('2008-12-24T10:00:00+09:00', $result[0]->fm_updated());
$c = 0;
for ($i = 0; $i < 10; $i++) {
    $a = $b = [];
    foreach (\test\db\Find::find_all(Q::random_order()) as $o) {
        $a[] = $o->id();
    }
    foreach (\test\db\Find::find_all(Q::random_order()) as $o) {
        $b[] = $o->id();
    }
    if ($a === $b) {
        $c++;
    }
}
neq(10, $c);
$result = \test\db\Find::find_all(Q::ob(Q::b(Q::eq('value1', 'abc')), Q::b(Q::eq('value2', 'EDC'))));
eq(2, sizeof($result));
eq('EDC', \test\db\Find::find_get(Q::eq('value1', 'jkl'))->value2());
$i = 0;
$r = array('abc', 'def', 'ghi', 'jkl');
foreach (\test\db\RefFind::find() as $obj) {
    eq(isset($r[$i]) ? $r[$i] : null, $obj->value());
    $i++;
}
eq(4, $i);
$i = 0;
$r = array('abc', 'def', 'ghi');
foreach (\test\db\RefRefFind::find() as $obj) {
    eq(isset($r[$i]) ? $r[$i] : null, $obj->value());
    $i++;
}
示例#2
0
文件: AbcFind.php 项目: tokushima/ebi
 protected function __find_conds__()
 {
     return Q::b(Q::eq('value1', 'abc'));
 }