Ferreteria/v0.6/clade/Sys/Data/Engine/schema/Ops
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
interface iOps extends BaseIface {
// DETAILS
function DbConn() : DbConnIface;
function DbOper() : DbOperIface;
function QSchemaName() : QStrIface;
function SchemaName() : string;
// ACTION
function DoExport(FileIface $ofData) : ActionIface;
function DoImport(FileIface $ofData, bool $okToReplace) : ActionIface;
// STATE
#function ActionStatus() : ActionIface;
}
abstract class caOps extends BaseClass implements SelfIface {
// ++ SETUP ++ //
# public function __construct(private DbOperIface $oDBO, private string $sSchema) {}
public function __construct(private DbConnIface $oDBC, private string $sSchema) {}
public function DbConn() : DbConnIface { return $this->oDBC; }
public function DbOper() : DbOperIface { 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 -- //
}