Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

tyrsson
Copy link
Member

@tyrsson tyrsson commented Mar 18, 2025

No description provided.

Signed-off-by: Joey Smith <jsmith@webinertia.net>

Signed-off-by: Joey Smith <jsmith@webinertia.net>
@tyrsson tyrsson self-assigned this Mar 18, 2025
@tyrsson tyrsson added this to the 0.0.1 milestone Mar 18, 2025
@tyrsson tyrsson merged commit 80238e7 into 0.1.x Mar 18, 2025
2 of 14 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in @laminas-db Mar 18, 2025
@tyrsson tyrsson deleted the initial-file-import branch March 18, 2025 06:58
}

// localize
$p = $this->connectionParameters;
Copy link
Contributor

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
Member Author

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.

Copy link
Contributor

@simon-mundy simon-mundy left a comment

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
Contributor

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
Member Author

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
Contributor

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
Member Author

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
Contributor

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
Member Author

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
Contributor

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
Member Author

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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants