Skip to content

Initial file import from laminas-db (proposed structure only) - #5

Merged
tyrsson merged 1 commit into
0.1.xfrom
initial-file-import
Mar 18, 2025
Merged

Initial file import from laminas-db (proposed structure only)#5
tyrsson merged 1 commit into
0.1.xfrom
initial-file-import

Conversation

@tyrsson

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Joey Smith <jsmith@webinertia.net>
Signed-off-by: Joey Smith <jsmith@webinertia.net>
@tyrssontyrsson self-assigned this Mar 18, 2025
@tyrssontyrsson added this to the 0.0.1 milestone Mar 18, 2025
@tyrsson
tyrsson merged commit 80238e7 into 0.1.xMar 18, 2025
@tyrsson
tyrsson deleted the initial-file-import branch March 18, 2025 06:58
}

// localize
$p = $this->connectionParameters;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer $p -> $parameters for the sake of clarity

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, they will get normalized I'm sure. I was focused on higher level stuffz. We'll get to the granular stuffz pretty soon.

@simon-mundysimon-mundy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round, all looks good. Will install and test within a few days.

*/
public function rollback()
{
if (! $this->isConnected()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the $inTransaction check we could probably remove the isConnected() call

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, but I want to get a feel for the other satellite workflows and get a few of them behind us then we can be relatively sure we're not going to be breaking major stuffz.

*/
public function getCurrentSchema()
{
if (! $this->isConnected()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of duplication for the connection check - perhaps just a separate method call prepareConnection() which performs that function across multiple methods? Could even be a method within the AbstractConnection class?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not just in this family of classes. You find that nearly everywhere. So.... I need to reserve comment on that for awhile.

return $this;
}

/**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole method looks like it could be moved to the AbstractConnection class? There's not much specific to Mysqli

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I'll have to look that up since all I have to work from is line numbers :P

* @param string $nameFormat
* @return string
*/
public function getDatabasePlatformName($nameFormat = self::NAME_FORMAT_CAMELCASE)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth adding in constants for Database name?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm considering it via a Backed Enum. Would like to get a little further along before we make that decision though. No sake in adding code just to be adding code because with the way this is working out there is only a single DatabasePlatformName that could possibly be valid and that is the one for whichever satellite is currently installed.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@tyrsson@simon-mundy