Beispiel #1
0
    echo 'map string=string failed';
    exit;
}
$result = $db->map('id')->ArrayBuilder()->getOne('users', 'id,login,createdAt');
if (key($result) != 1 && !is_array($result[1])) {
    echo 'map string=array failed';
    exit;
}
$result = $db->map('id')->ObjectBuilder()->getOne('users', 'id,login');
if (key($result) != 1 && $result[1] != 'user1') {
    echo 'map object string=string failed';
    exit;
}
$result = $db->map('id')->ObjectBuilder()->getOne('users', 'id,login,createdAt');
if (key($result) != 1 && !is_object($result[1])) {
    echo 'map string=object failed';
    exit;
}
///
//TODO: insert test
$db->delete("users");
$db->get("users");
if ($db->count != 0) {
    echo "Invalid users count after delete";
    exit;
}
$db->delete("products");
//print_r($db->rawQuery("CALL simpleproc(?)",Array("test")));
print_r($db->trace);
echo "All done\n";
echo "Memory usage: " . memory_get_peak_usage() . "\n";