Futilities/v0.6/clade/Sys/dba/InReq/DoExport/Schema
Jump to navigation
Jump to search
| ||||||||||||||||||
Code
interface iSchema extends BaseIface {}
class cSchema extends BaseClass implements iSchema {
use DFmtTrait;
use RFmtTrait;
// CEMENT (I think)
protected function ParseInputString(string $s) : void {
// main input is name of dbconn containing the schema
$this->SaveAsEngConnName($s);
}
protected function ParseInputArgs(array $ar) {
$sSchema = $ar[0]; // first extra input is the schema name
$this->SaveAsEngSchemaName($sSchema);
}
public function Describe() : string {
$osConnSlug = $this->OAUserInput()->QDbConnSlug();
if ($osConnSlug->HasIt()) {
$sConnSlug = $osConnSlug->GetIt();
$osSchmSlug = $this->OAUserInput()->QDbSchmSlug();
if ($osSchmSlug->HasIt()) {
$sSchmSlug = $osSchmSlug->GetIt();
$sRtn = "export schema '$sSchmSlug' from the '$sConnSlug' db connection";
} else {
$sRtn = "export all schemas from the '$sConnSlug' db connection";
// set the engine slug
$osConnSlug->SetIt($sConnSlug);
#echo $this->ReflectThis()->Report();
}
} else {
$sRtn = "export all schemas from a db connection (not yet specified)".$this->ListHosts();
}
return $sRtn;
}
}