Ferreteria/v0.6/clade/Sys/Data/Engine/Oper/MyMar/@fx/DoExport

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | Sys‎ | Data‎ | Engine‎ | Oper‎ | MyMar
Revision as of 03:14, 3 December 2025 by Woozle (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

Code

as of 2025-12-02:

#
    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;
    }