-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
Signed-off-by: Joey Smith <jsmith@webinertia.net> Signed-off-by: Joey Smith <jsmith@webinertia.net>
} | ||
|
||
// localize | ||
$p = $this->connectionParameters; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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()) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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()) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
No description provided.