Ferreteria/v0.6/clade/Sys/Data/Engine/aux/Schema
Jump to navigation
Jump to search
| ||||||||||||||||||||||||||||||
About
- Purpose: Schema operations parent-class
- Requires:
- database-engine object
- schema name
History
- 2025-01-01 started
- 2025-03-12 added
$okToReplaceargument toDoImport().- I'm still torn about whether that should be passed some other way,
- but this will work for now.
- 2025-06-01 moved from [WFe]
Sys\Data\aux⇒ [WFe]Sys\Data\Engine - 2025-10-06 Changing this so it is initialized with
iConninstead ofiOper - 2025-11-22 Refactoring schema-management just a bit
Code
as of 2026-02-22 (just after renaming; was working(ish)):
interface iSchema extends BaseIface {
// DETAILS
#function OServer() : ServerIface;
#function OClient() : ClientIface;
function OEngine() : EngineIface;
function QSchemaName() : QStrIface;
function SchemaName() : string;
// ACTION
function DoExport(FileIface $ofData) : ActionIface;
function DoImport(FileIface $ofData, bool $okToReplace) : ActionIface;
}
abstract class caSchema extends BaseClass implements SelfIface {
// ++ SETUP ++ //
protected function __construct(){}
public static function FromEngine(EngineIface $oEng, string $sSchema) {
$oThis = new static;
$oThis->oEngine = $oEng;
$oThis->sSchema = $sSchema;
return $oThis;
}
// 2026-02-06 Is this ever needed? Why?
#public function OClient() : ClientIface { return $this->oDBC->OOper(); }
public function QSchemaName() : QStrIface { return QStrClass::FromString($this->sSchema); } // 2025-11-09 Why do we need this?
public function SchemaName() : string { return $this->sSchema; }
// -- SETUP -- //
// ++ OBJECTS ++ //
private $oEngine;
public function OEngine() : EngineIface { return $this->oEngine; }
private $oPanel=NULL;
protected function OPanel(?PanelIface $o=NULL) : PanelIface { return is_null($o) ? ($this->oPanel ?? $this->oPanel = new PanelClass) : ($this->oPanel = $o); }
// -- OBJECTS -- //
}