2026/03/21

From Woozle Writes Code
< 2026‎ | 03
Jump to navigation Jump to search
Saturday, March 21, 2026 (#80)
Friday Saturday Sunday posts:prev <this> next

References

  • 10:21 The array-clades remain an unseemly mess. Just how deep shall I dive in trying to tidy them? I can at least (per decision a week or three ago) stop worrying about redundant interface-inheritance.
  • 15:24 Did as little as I could do -- which ended up including a rename/move of QVal to QVar\RO -- and the code is now back to its new-normal level of dysfunctionality.
  • 21:16 And now -- aha, yes, I do see the problem. The connection may be staying open at the logical level, but each SQL command is still being wrapped in an echo clause, meaning each one is invoking a separate instance of the Engine, so... obviously the state is not going to be persistent. I think maybe I can fix this with just a flag, or at least it shouldn't require any new infra.
  • 21:40 Except... Q1: how is it still getting wrapped? The Command-object is being created with just the raw SQL...
    • $oCmd->AsString() produces "USE `htyp_mw`;
    • ...but proc_get_status() shows the command as echo 'SHOW SCHEMAS;' | mariadb -hlocalhost -uroot -p<password redacted>
    • A1: It's happening because the next-link Server is [WFe]Sys\Data\Engine\endpt\Server\MyMar\cMaria. Pretty sure I worked out a way to bypass the wrapping there...
      • Right: Upon return from DoCommand($oCmd), $oCmd->QORunner()->GetIt() will be the endpoint Runner -- so I need to get that from somewhere and set it in all subsequent commands, and then modify Commands to use it if set (spoiler: already did that part).
      • Better, actually: just create the Commands queue using that Runner (instead of the next-link Server), and then everything in the queue will be sent directly.
      • The only problem with all this is that now I find myself needing to pass the Runner around all over the place -- including the Engine Client, for SchemaExists(). I feel like there's got to be a better way... like, if that connection is now "open", shouldn't everything go there directly? Is there ever any reason not to send stuff to the end-Runner as long as the connection hasn't been closed? Or is this oversimplifying too much?