-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
T14733 Data Mapper PDO Connection #14824
Conversation
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.
Great work buddy!
phalcon/DM/Pdo/Connection.zep
Outdated
|
||
if !this->pdo { | ||
// connect | ||
this->profiler->start(__FUNCTION__); |
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.
Can we make the profiler optional for perfomance?
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.
The if
statement is in the Profiler class (active
). It was a tradeoff between putting if statements in every fetch
method and not having one method call vs. having the method call and the if
is in the profiler.
phalcon/DM/Pdo/Connection.zep
Outdated
* @license https://github.com/atlasphp/Atlas.Pdo/blob/1.x/LICENSE.md | ||
*/ | ||
|
||
namespace Phalcon\DM\Pdo; |
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 think the the DM can be a bit confusing. This could also be Device management, Device mapper, Distributed Mama's ;) etc. Can we just name it DataMapper? It isn't super long, and I don't see the advantages of abbreviation here.
Hello!
In raising this pull request, I confirm the following:
Added new PDO wrapper for the Data Mapper implementation, with decorated instance, locator and profiler
DM\Connection
DM\Connection\Decorated
DM\Profiler\Profiler
DM\Profiler\MemoryLogger
DM\ConnectionLocator
This component will be used in the Data Mapper implementation but can be used as a stand alone component for PDO connections.
Thanks