Ferreteria/v0.6/clade/Sys/Data/Engine/Oper/MyMar/@fx/DoExport
Jump to navigation
Jump to search
About
Code
#
public function DoExport(string $sSchema, RecvBuffClass $oInBuff) : CommOpIface {
$oConnDB = $this->OConn(); // DB connection
$oSockDB = $oConnDB->OSock();
$oConnSh = $oSockDB->OPlug();
$sCred = $oConnDB->CredsForCmd(); // DB connection string from DB-local shell
$sCmd = "mysqldump $sCred --quick $sSchema"; // "--quick" does line-at-a-time rather than buffering entire table
// should we also try "--single-transaction"? "To dump large tables, you should combine the --single-transaction option with --quick."
// Send dump command directly to shell, not to DB engine:
$oAct = $oConnSh->DoCommand($sCmd,$oInBuff,new CommOpClass);
return $oAct;
}