Ferreteria/v0.6/clade/Sys/Data/Engine/schema/Ops/MyMar/@removed: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | Sys‎ | Data‎ | Engine‎ | schema/Ops‎ | MyMar
Jump to navigation Jump to search
(Created page with "{{fmt/title|Removed Code}} =={{fmt/date|2025|04|12}}== From the middle of <code>{{l/ver/fx|DoImport}}()</code>: {{fmt/php/block|1=# // This version will only work locally. // This is probably faster than buffering... // ...but doesn't allow the possibility of showing progress since there's no middleman to audit the data stream. $sCmd = "mysql $sCreds -D$sSchema < $fsData"; // NOTE: "--quick" can do line-at-a-tim...")
 
(No difference)

Latest revision as of 13:44, 25 November 2025

Removed Code

2025-04-12

From the middle of DoImport():

#
            // This version will only work locally.
            // This is probably faster than buffering...
            // ...but doesn't allow the possibility of showing progress since there's no middleman to audit the data stream.
            $sCmd = "mysql $sCreds -D$sSchema < $fsData";
            // NOTE: "--quick" can do line-at-a-time rather than buffering entire table
            // NOTE: "-D<arg>" = "--database=<arg>"

2025-01-26

This (commented out earlier, from DoBackup() which is now DoExport()) has probably been moved elsewhere, but I'm being paranoid:

#
        // TODO: include program name/version
        $sDateFmt = 'Y/m/d H:i:s';   // "/" chars get escaped, so "." makes the text a little more readable
        $arMeta['db.slug'] = $this->Engine()->ObjectSlug();
        $arMeta['schema'] = $sSchema;
        $arMeta['fspec'] = $fsData; // TODO: get just the filename
        $arMeta['time.start.int'] = time();
        $arMeta['time.start.str'] = date($sDateFmt);
        $fsMeta = $fsData.'.json';
        $jsMeta = json_encode($arMeta,JSON_PRETTY_PRINT);
        file_put_contents($fsMeta,$jsMeta);

This is from inside if ($oAct->GetOkay()) {:

#
            // TODO: integrate $oActBuff results
            if ($oAct->QResponseErr()->HasIt()) {
                $sMsg = trim($oAct->QResponseErr()->GetIt());
                $oScrn->ErrorIt('Error stream').': $sMsg'.CRLF;
            }

            // 2025-01-25 old message-handling
            $sMsg = trim($oAct->GetMessage());
            echo ' - ' . (($oAct->GetOkay() ? $oScrn->GreenIt('Done.') : ($oScrn->ErrorIt('Error: ').$sMsg))) . CRLF;

...and this is from after the if is closed:

#
        $arMeta['time.finish.int'] = time();
        $arMeta['time.finish.str'] = date($sDateFmt);
        $arMeta['status.cmd'] = $oAct->GetStatusText();
        if (is_object($oActBuff)) {
            $arMeta['status.buff'] = $oActBuff->GetStatusText();  // This may be unnecessary.
        }
        $jsMeta = json_encode($arMeta,JSON_PRETTY_PRINT);
        file_put_contents($fsMeta,$jsMeta); // update the metadata file