-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Implementation of database drivers (recreated) #10
Open
writ3it
wants to merge
53
commits into
stefangabos:master
Choose a base branch
from
writ3it:release-for-main-repository
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
isConnected
Driver extracting
column escaping
missing constructor for compatibility
Seems a good idea to allow for PDO. What are the sticking points to using this and/or merging it into mainline? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I prepared version of Zebra_Mptt library with database drivers which makes possible to change a connection type to (f.e.) pdo. Zebra_mptt is very useful but in some projects is necessary to use pdo. Hardcoded mysqli dependency is a problem in legacy code or micro-frameworks based on PDO. In my opinion, database drivers are a good solution.
I reviewed Zebra_database for some implementations but I didn't found something like that. Proposed solution is compatible (through some adapter) with that library, I think.
Another advantage of drivers is making code testable. I implemented some tests.
I think that I discovered bug at copy function (using php 7.3). When node has children, loop (iterating over sources) is infinity because reference variable ($properties) is modified. I didn't spent too much time to investigate this bug. Maybe I am wrong or my php version is buggy.
Best regards and thanks for the library!
p.s. Now I see that i attached self to composer.json as contributor :) If it's problem I can removed it.
p.s.2. It's possible that I will develop the next version of my idea so, I created a branch which is in compatibility with main solution and the PR was re-created.