2026/03/09
Jump to navigation
Jump to search
how
|
Monday, March 9, 2026 (#68)
|
|
how Canals work
What happens currently:
- In the
DoCommand()for bothLocalandSSH2:- The
Canalsobject ($oCables) is created withCanalsClass::FromVoid(). (CanalsClass=IO\Aspect\Connx\aux\A\cCanals)
- The
- In
Local, each of the possibleStreams which might have been assigned to theCommandare checked. Each one found is paired in aCable-object ($oCable) with the appropriate process stream, and that$oCableis then added to$oCables. - In
SSH2, only theCommand's Listener stream is checked.- My first thought was "this may be why exports are working and imports are not", but actually the only testing I've done on imports is with a local DB, which would use
Local::DoCommand-- so that can't be it. - My next guess is that the
Commandobject is being configured with the necessary streams by the exporter-code but not by the importer-code.
- My first thought was "this may be why exports are working and imports are not", but actually the only testing I've done on imports is with a local DB, which would use
- Q1: (a) Where does the exporter-code do this, and (b) where should the importer-code do it?
- A1a: in
Engine/aux/Schema/MyMar::ExportToStream()(called fromDoExport()).DoExport()is, in turn, called fromEngine/aux/ActionRq/Admin/dbase/EngDbExport::Go(), which loops through all schemas and callsDoExport()on each of them.- Side note: I think I keep getting schemas confused with tables and/or databases. I feel like there needs to be a more technical/specific word for "collection of schemas", since "database" is often overloaded in colloquial usage.
- A1b: I think we need
Engine/aux/Schema/MyMar::ImportFromStream(), unless I'm just confused again.- We do in fact already have
Engine/aux/Schema/MyMar::DoImport.- ...which itself was being called from
Go()in DBA'scaEngScImport-descendant, rather than fromcaEngScImportitself. I have movedGo()up intocaEngScImport, for consistency.
- ...which itself was being called from
- We do in fact already have
- A1a: in
Further tidying for consistency:
- Move the meat of
caEngDbExport's Schema-loop intocaEngScExport, or else get rid ofcaEngScExport(currently just empty declarations) and resolve the inconsistency this creates withcaEngScImport.
17:00
It turns out "the meat of caEngDbExport's Schema-loop" is already spun out to DoExport(). This makes me think that maybe caEngScExport and caEngScImport don't actually need to exist? Or are they still necessary for the podling-classes, somehow?
17:41
caEngScExportis definitely redundant; I've commented it out.caEngScImportis a little trickier, because it has aGo()function now (recently moved from its DBA-podling, see above). I'm pretty sure this can be moved toSchema, but there are loose threads to tidy up at both ends...- For one thing,
Engine/aux/Schema/MyMar::DoImport()is already a thing. There's some parallelism-failure going on here which needs to be tracked down...
- For one thing,
19:29
The non-parallelism, and some of my confusion, arises from the fact that DoExport() applies to both an entire database-connection and individual schemas, while DoImport() only implies to one schema at a time (simply because I don't (yet?) have any use-cases where I'd want to import multiple schemas with a single command).
20:34
Changes:
- 🟢 rename/move
Engine/aux/ActionRq/Admin/dbase/EngDbExport⇒Engine/aux/ActionRq/Admin/ExportDtbase- I'm not swimmingly happy with "dtbase" as the affix for "database", but at least it has the same number of letters as "schema".
- 🟢 move
[WFe]Sys\Data\Engine\aux\ActionRq\Admin\ItWent⇒[WFe]Sys\Data\Engine\aux\ActionRq\Admin\aux\ItWent - 🟢 move
[WFe]Sys\Data\Engine\aux\ActionRq\Admin\dbase\EngDbScList⇒Engine/aux/ActionRq/Admin/ListSchemas - 🔴 move code from
[WFe]Sys\Data\Engine\aux\ActionRq\Admin\schema\caEngScImport::Go()toEngine/aux/SchemaorEngine/aux/Schema/MyMar, and eliminate[WFe]Sys\Data\Engine\aux\ActionRq\Admin\schema\EngScImport.