本文整理汇总了PHP中Build::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP Build::insert方法的具体用法?PHP Build::insert怎么用?PHP Build::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Build
的用法示例。
在下文中一共展示了Build::insert方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insert
function insert($details)
{
$conn = new Connection("auto");
$query = new Build();
$result = $query->insert($conn->grab_conn(), $details, "close");
return $result;
}
示例2: createOutOfOrder
public static function createOutOfOrder($machine_id, $mode_id, $revision, $run_before_id, $run_after_id)
{
$run_before = new Run($run_before_id);
$run_after = new Run($run_after_id);
// Find the sorting order where we could add this revision;
$sort_order = RunReporter::findSortOrder($run_before, $mode_id, $revision);
// Get the approx stamp of the run with the sort_order before the one we are replacing.
$old_run = Run::withMachineAndSortOrder($machine_id, $sort_order - 1);
$approx_stamp = $old_run->approx_stamp();
// sanity check.
RunReporter::assertInBound($run_before, $run_after, $mode_id, $sort_order);
// Create a space at the given sort_order, by shifting all sort_order,
// equal or higher than the given sort_order.
RunReporter::increaseNextSortOrder($machine_id, $sort_order);
$run = Run::insert($machine_id, $sort_order, $approx_stamp);
$run->updateInt("out_of_order", 1);
$build = Build::insert($run, $mode_id, $revision);
return $run;
}
示例3: Run
if (GET_string("run") == 'addEngine') {
$run = new Run(GET_int('runid'));
$revision = GET_string('cset');
$mode = Mode::FromMode(GET_string('name'));
if ($run->isFinished() || $run->hasError()) {
throw new Exception("Run was already finished or error'ed");
}
if ($run->isOutOfOrder()) {
// out of order builds cannot add extra modes. The available
// mode have already been added.
if (!Build::withRunAndMode($run->id, $mode->id)) {
$run->finish(0, "Tried to add extra modes to out of order run.");
}
die;
}
Build::insert($run, $mode->id, $revision);
die;
}
// Report that a slave is still awake when there are no benchmarks results
// to send.
if (GET_string('awake') == 'yes') {
$MACHINE = GET_int('MACHINE');
mysql_query("UPDATE awfy_machine\n SET last_checked = UNIX_TIMESTAMP()\n WHERE id = {$MACHINE}") or die("ERROR: " . mysql_error());
die;
}
// Report score of a benchmark total or subtest.
$run_id = GET_int('run');
$run = new Run($run_id);
if ($run->isFinished() || $run->hasError()) {
throw new Error("Run was already finished or error'ed");
}