Skip to content
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

Cache created decorated connection #2191

Merged
merged 3 commits into from
Jun 1, 2023
Merged

Conversation

MasterOdin
Copy link
Member

@MasterOdin MasterOdin commented Apr 19, 2023

PR pulls a commit from the 1.x branch, where when generating the decorated connection as part of getDecoratedConnection, since it's likely that each call to the function would always just return the same thing anyway currently, just with the overhead of creating a fresh class each time. This is most beneficial to people using the Query Builder.

As part of this, I've moved getDecoratedConnection to be part of the base PdoAdapter class as it then allows some code sharing, while creating a new getDecoratedConnectionConfig function that gets the individual adapter code.

@MasterOdin MasterOdin merged commit fc29cf2 into 0.x Jun 1, 2023
@MasterOdin MasterOdin deleted the simplify_decorated_connection branch June 1, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant