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

SecureADODB: Existence of IDbConnection_CreateCommand appears counterintuitive #7

Open
pchemguy opened this issue Jan 27, 2021 · 0 comments

Comments

@pchemguy
Copy link
Contributor

pchemguy commented Jan 27, 2021

What is the idea behind the IDbConnection_CreateCommand interface method?
IDbCommandFactory takes an IDbConnection interface and returns an IDbCommand interface with the logical place for initialization of the object behind it (as initiated via the .Execute method) being the IDbCommandBase_CreateCommand interface. However, IDbCommandBase_CreateCommand in turn calls IDbConnection_CreateCommand interface, which merely duplicates the Guards present in IDbCommandBase_CreateCommand and then sets basic command properties passed from IDbCommandBase_CreateCommand. It appears that this way unnecessary coupling and a loop IDbConnection->IDbCommand->IDbConnection are generated.
I would remove the IDbConnection_CreateCommand interface, placing all of the necessary code in IDbCommandBase_CreateCommand. I can submit a pull request for this issue.

SecureADODB_CreateCommand

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

No branches or pull requests

1 participant